foundation-rails 6.6.1.0 → 6.9.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +2 -0
- data/Appraisals +4 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +199 -146
- data/bower.json +3 -3
- data/foundation-rails.gemspec +4 -4
- data/gemfiles/rails_7.1.gemfile +10 -0
- data/gemfiles/rails_7.1.gemfile.lock +261 -0
- data/lib/foundation/rails/version.rb +1 -1
- data/lib/generators/foundation/templates/_settings.scss +32 -28
- data/vendor/assets/js/foundation.cjs.js +2101 -3230
- data/vendor/assets/js/foundation.cjs.js.map +1 -1
- data/vendor/assets/js/foundation.es6.js +505 -379
- data/vendor/assets/js/foundation.es6.js.map +1 -1
- data/vendor/assets/js/foundation.esm.js +1779 -2911
- data/vendor/assets/js/foundation.esm.js.map +1 -1
- data/vendor/assets/js/foundation.js +2544 -3970
- data/vendor/assets/js/foundation.js.map +1 -1
- data/vendor/assets/js/foundation.min.js +1 -1
- data/vendor/assets/js/foundation.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.abide.js +277 -367
- data/vendor/assets/js/plugins/foundation.abide.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.abide.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.abide.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordion.js +205 -277
- data/vendor/assets/js/plugins/foundation.accordion.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordion.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.accordion.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordionMenu.js +174 -262
- data/vendor/assets/js/plugins/foundation.accordionMenu.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.core.js +314 -457
- data/vendor/assets/js/plugins/foundation.core.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.core.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.core.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.drilldown.js +259 -359
- data/vendor/assets/js/plugins/foundation.drilldown.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.drilldown.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.drilldown.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdown.js +291 -462
- data/vendor/assets/js/plugins/foundation.dropdown.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdown.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.dropdown.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js +251 -349
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.equalizer.js +178 -261
- data/vendor/assets/js/plugins/foundation.equalizer.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.equalizer.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.equalizer.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.interchange.js +455 -240
- data/vendor/assets/js/plugins/foundation.interchange.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.interchange.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.interchange.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.magellan.js +226 -342
- data/vendor/assets/js/plugins/foundation.magellan.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.magellan.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.magellan.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.offcanvas.js +326 -471
- data/vendor/assets/js/plugins/foundation.offcanvas.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.offcanvas.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.offcanvas.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.orbit.js +244 -347
- data/vendor/assets/js/plugins/foundation.orbit.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.orbit.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.orbit.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js +203 -288
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js +205 -255
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js +170 -226
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.reveal.js +285 -445
- data/vendor/assets/js/plugins/foundation.reveal.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.reveal.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.reveal.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.slider.js +321 -486
- data/vendor/assets/js/plugins/foundation.slider.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.slider.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.slider.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.smoothScroll.js +138 -188
- data/vendor/assets/js/plugins/foundation.smoothScroll.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.smoothScroll.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.smoothScroll.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.sticky.js +253 -395
- data/vendor/assets/js/plugins/foundation.sticky.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.sticky.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.sticky.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tabs.js +228 -317
- data/vendor/assets/js/plugins/foundation.tabs.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tabs.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.tabs.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.toggler.js +207 -294
- data/vendor/assets/js/plugins/foundation.toggler.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.toggler.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.toggler.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tooltip.js +276 -437
- data/vendor/assets/js/plugins/foundation.tooltip.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.tooltip.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.tooltip.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.box.js +176 -234
- data/vendor/assets/js/plugins/foundation.util.box.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.box.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.box.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js +110 -150
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.keyboard.js +157 -172
- data/vendor/assets/js/plugins/foundation.util.keyboard.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.keyboard.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.keyboard.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js +167 -233
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.motion.js +127 -161
- data/vendor/assets/js/plugins/foundation.util.motion.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.motion.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.motion.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.nest.js +126 -160
- data/vendor/assets/js/plugins/foundation.util.nest.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.nest.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.nest.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.timer.js +116 -171
- data/vendor/assets/js/plugins/foundation.util.timer.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.timer.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.timer.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.touch.js +172 -228
- data/vendor/assets/js/plugins/foundation.util.touch.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.touch.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.touch.min.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.triggers.js +158 -222
- data/vendor/assets/js/plugins/foundation.util.triggers.js.map +1 -1
- data/vendor/assets/js/plugins/foundation.util.triggers.min.js +1 -1
- data/vendor/assets/js/plugins/foundation.util.triggers.min.js.map +1 -1
- data/vendor/assets/scss/_global.scss +20 -7
- data/vendor/assets/scss/components/_accordion-menu.scss +2 -2
- data/vendor/assets/scss/components/_accordion.scss +2 -2
- data/vendor/assets/scss/components/_badge.scss +3 -3
- data/vendor/assets/scss/components/_breadcrumbs.scss +4 -3
- data/vendor/assets/scss/components/_button-group.scss +23 -13
- data/vendor/assets/scss/components/_button.scss +15 -15
- data/vendor/assets/scss/components/_callout.scss +4 -4
- data/vendor/assets/scss/components/_card.scss +2 -2
- data/vendor/assets/scss/components/_close-button.scss +7 -6
- data/vendor/assets/scss/components/_drilldown.scss +2 -2
- data/vendor/assets/scss/components/_dropdown-menu.scss +3 -3
- data/vendor/assets/scss/components/_dropdown.scss +2 -2
- data/vendor/assets/scss/components/_flex.scss +2 -2
- data/vendor/assets/scss/components/_float.scss +2 -2
- data/vendor/assets/scss/components/_label.scss +3 -3
- data/vendor/assets/scss/components/_media-object.scss +2 -2
- data/vendor/assets/scss/components/_menu.scss +56 -21
- data/vendor/assets/scss/components/_off-canvas.scss +20 -18
- data/vendor/assets/scss/components/_orbit.scss +5 -5
- data/vendor/assets/scss/components/_pagination.scss +3 -3
- data/vendor/assets/scss/components/_progress-bar.scss +3 -3
- data/vendor/assets/scss/components/_responsive-embed.scss +3 -3
- data/vendor/assets/scss/components/_reveal.scss +10 -5
- data/vendor/assets/scss/components/_slider.scss +7 -4
- data/vendor/assets/scss/components/_sticky.scss +2 -2
- data/vendor/assets/scss/components/_switch.scss +27 -4
- data/vendor/assets/scss/components/_table.scss +10 -9
- data/vendor/assets/scss/components/_tabs.scss +4 -4
- data/vendor/assets/scss/components/_thumbnail.scss +2 -2
- data/vendor/assets/scss/components/_title-bar.scss +2 -2
- data/vendor/assets/scss/components/_tooltip.scss +2 -2
- data/vendor/assets/scss/components/_top-bar.scss +9 -7
- data/vendor/assets/scss/components/_visibility.scss +48 -5
- data/vendor/assets/scss/forms/_checkbox.scss +2 -2
- data/vendor/assets/scss/forms/_error.scss +2 -2
- data/vendor/assets/scss/forms/_fieldset.scss +2 -2
- data/vendor/assets/scss/forms/_forms.scss +2 -2
- data/vendor/assets/scss/forms/_help-text.scss +2 -2
- data/vendor/assets/scss/forms/_input-group.scss +2 -2
- data/vendor/assets/scss/forms/_label.scss +4 -3
- data/vendor/assets/scss/forms/_meter.scss +2 -2
- data/vendor/assets/scss/forms/_progress.scss +3 -3
- data/vendor/assets/scss/forms/_range.scss +3 -3
- data/vendor/assets/scss/forms/_select.scss +7 -6
- data/vendor/assets/scss/forms/_text.scss +4 -4
- data/vendor/assets/scss/foundation.scss +3 -3
- data/vendor/assets/scss/grid/_classes.scss +3 -3
- data/vendor/assets/scss/grid/_column.scss +5 -4
- data/vendor/assets/scss/grid/_flex-grid.scss +9 -8
- data/vendor/assets/scss/grid/_grid.scss +2 -2
- data/vendor/assets/scss/grid/_gutter.scss +3 -3
- data/vendor/assets/scss/grid/_layout.scss +7 -7
- data/vendor/assets/scss/grid/_position.scss +6 -6
- data/vendor/assets/scss/grid/_row.scss +3 -3
- data/vendor/assets/scss/grid/_size.scss +2 -2
- data/vendor/assets/scss/motion-ui/util/_animation.scss +1 -1
- data/vendor/assets/scss/motion-ui/util/_series.scss +1 -1
- data/vendor/assets/scss/motion-ui/util/_unit.scss +54 -1
- data/vendor/assets/scss/prototype/_arrow.scss +2 -2
- data/vendor/assets/scss/prototype/_border-box.scss +2 -2
- data/vendor/assets/scss/prototype/_border-none.scss +3 -3
- data/vendor/assets/scss/prototype/_bordered.scss +2 -2
- data/vendor/assets/scss/prototype/_box.scss +2 -2
- data/vendor/assets/scss/prototype/_display.scss +2 -2
- data/vendor/assets/scss/prototype/_font-styling.scss +4 -4
- data/vendor/assets/scss/prototype/_list-style-type.scss +2 -2
- data/vendor/assets/scss/prototype/_overflow.scss +11 -2
- data/vendor/assets/scss/prototype/_position.scss +2 -2
- data/vendor/assets/scss/prototype/_prototype.scss +2 -2
- data/vendor/assets/scss/prototype/_rotate.scss +9 -7
- data/vendor/assets/scss/prototype/_rounded.scss +2 -2
- data/vendor/assets/scss/prototype/_separator.scss +7 -7
- data/vendor/assets/scss/prototype/_shadow.scss +3 -4
- data/vendor/assets/scss/prototype/_sizing.scss +2 -2
- data/vendor/assets/scss/prototype/_spacing.scss +35 -35
- data/vendor/assets/scss/prototype/_text-decoration.scss +2 -2
- data/vendor/assets/scss/prototype/_text-transformation.scss +5 -5
- data/vendor/assets/scss/prototype/_text-utilities.scss +2 -2
- data/vendor/assets/scss/settings/_settings.scss +32 -28
- data/vendor/assets/scss/typography/_alignment.scss +2 -2
- data/vendor/assets/scss/typography/_base.scss +8 -8
- data/vendor/assets/scss/typography/_helpers.scss +12 -4
- data/vendor/assets/scss/typography/_print.scss +4 -4
- data/vendor/assets/scss/typography/_typography.scss +2 -2
- data/vendor/assets/scss/util/_breakpoint.scss +24 -21
- data/vendor/assets/scss/util/_color.scss +22 -10
- data/vendor/assets/scss/util/_direction.scss +3 -3
- data/vendor/assets/scss/util/_flex.scss +1 -1
- data/vendor/assets/scss/util/_math.scss +63 -11
- data/vendor/assets/scss/util/_mixins.scss +20 -16
- data/vendor/assets/scss/util/_selector.scss +3 -17
- data/vendor/assets/scss/util/_typography.scss +8 -8
- data/vendor/assets/scss/util/_unit.scss +16 -10
- data/vendor/assets/scss/util/_util.scss +2 -2
- data/vendor/assets/scss/util/_value.scss +5 -20
- data/vendor/assets/scss/vendor/normalize.scss +19 -2
- data/vendor/assets/scss/xy-grid/_cell.scss +18 -7
- data/vendor/assets/scss/xy-grid/_classes.scss +16 -16
- data/vendor/assets/scss/xy-grid/_collapse.scss +2 -2
- data/vendor/assets/scss/xy-grid/_frame.scss +12 -0
- data/vendor/assets/scss/xy-grid/_grid.scss +4 -4
- data/vendor/assets/scss/xy-grid/_gutters.scss +4 -4
- data/vendor/assets/scss/xy-grid/_layout.scss +3 -3
- data/vendor/assets/scss/xy-grid/_position.scss +14 -9
- data/vendor/assets/scss/xy-grid/_xy-grid.scss +4 -4
- metadata +21 -19
@@ -4,142 +4,24 @@
|
|
4
4
|
else if(typeof define === 'function' && define.amd)
|
5
5
|
define(["./foundation.core", "jquery"], factory);
|
6
6
|
else if(typeof exports === 'object')
|
7
|
-
exports["
|
7
|
+
exports["__FOUNDATION_EXTERNAL__"] = factory(require("./foundation.core"), require("jquery"));
|
8
8
|
else
|
9
9
|
root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.keyboard"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]);
|
10
|
-
})(
|
11
|
-
return /******/ (function(
|
12
|
-
/******/
|
13
|
-
/******/ var
|
14
|
-
/******/
|
15
|
-
/******/ // The require function
|
16
|
-
/******/ function __webpack_require__(moduleId) {
|
17
|
-
/******/
|
18
|
-
/******/ // Check if module is in cache
|
19
|
-
/******/ if(installedModules[moduleId]) {
|
20
|
-
/******/ return installedModules[moduleId].exports;
|
21
|
-
/******/ }
|
22
|
-
/******/ // Create a new module (and put it into the cache)
|
23
|
-
/******/ var module = installedModules[moduleId] = {
|
24
|
-
/******/ i: moduleId,
|
25
|
-
/******/ l: false,
|
26
|
-
/******/ exports: {}
|
27
|
-
/******/ };
|
28
|
-
/******/
|
29
|
-
/******/ // Execute the module function
|
30
|
-
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31
|
-
/******/
|
32
|
-
/******/ // Flag the module as loaded
|
33
|
-
/******/ module.l = true;
|
34
|
-
/******/
|
35
|
-
/******/ // Return the exports of the module
|
36
|
-
/******/ return module.exports;
|
37
|
-
/******/ }
|
38
|
-
/******/
|
39
|
-
/******/
|
40
|
-
/******/ // expose the modules object (__webpack_modules__)
|
41
|
-
/******/ __webpack_require__.m = modules;
|
42
|
-
/******/
|
43
|
-
/******/ // expose the module cache
|
44
|
-
/******/ __webpack_require__.c = installedModules;
|
45
|
-
/******/
|
46
|
-
/******/ // define getter function for harmony exports
|
47
|
-
/******/ __webpack_require__.d = function(exports, name, getter) {
|
48
|
-
/******/ if(!__webpack_require__.o(exports, name)) {
|
49
|
-
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
50
|
-
/******/ }
|
51
|
-
/******/ };
|
52
|
-
/******/
|
53
|
-
/******/ // define __esModule on exports
|
54
|
-
/******/ __webpack_require__.r = function(exports) {
|
55
|
-
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
56
|
-
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
57
|
-
/******/ }
|
58
|
-
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
59
|
-
/******/ };
|
60
|
-
/******/
|
61
|
-
/******/ // create a fake namespace object
|
62
|
-
/******/ // mode & 1: value is a module id, require it
|
63
|
-
/******/ // mode & 2: merge all properties of value into the ns
|
64
|
-
/******/ // mode & 4: return value when already ns object
|
65
|
-
/******/ // mode & 8|1: behave like require
|
66
|
-
/******/ __webpack_require__.t = function(value, mode) {
|
67
|
-
/******/ if(mode & 1) value = __webpack_require__(value);
|
68
|
-
/******/ if(mode & 8) return value;
|
69
|
-
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
70
|
-
/******/ var ns = Object.create(null);
|
71
|
-
/******/ __webpack_require__.r(ns);
|
72
|
-
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
73
|
-
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
74
|
-
/******/ return ns;
|
75
|
-
/******/ };
|
76
|
-
/******/
|
77
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
78
|
-
/******/ __webpack_require__.n = function(module) {
|
79
|
-
/******/ var getter = module && module.__esModule ?
|
80
|
-
/******/ function getDefault() { return module['default']; } :
|
81
|
-
/******/ function getModuleExports() { return module; };
|
82
|
-
/******/ __webpack_require__.d(getter, 'a', getter);
|
83
|
-
/******/ return getter;
|
84
|
-
/******/ };
|
85
|
-
/******/
|
86
|
-
/******/ // Object.prototype.hasOwnProperty.call
|
87
|
-
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
88
|
-
/******/
|
89
|
-
/******/ // __webpack_public_path__
|
90
|
-
/******/ __webpack_require__.p = "";
|
91
|
-
/******/
|
92
|
-
/******/
|
93
|
-
/******/ // Load entry module and return exports
|
94
|
-
/******/ return __webpack_require__(__webpack_require__.s = 23);
|
95
|
-
/******/ })
|
96
|
-
/************************************************************************/
|
97
|
-
/******/ ({
|
98
|
-
|
99
|
-
/***/ "./foundation.core":
|
100
|
-
/*!****************************************************************************************************************************************************************!*\
|
101
|
-
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***!
|
102
|
-
\****************************************************************************************************************************************************************/
|
103
|
-
/*! no static exports found */
|
104
|
-
/***/ (function(module, exports) {
|
105
|
-
|
106
|
-
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
|
107
|
-
|
108
|
-
/***/ }),
|
109
|
-
|
110
|
-
/***/ "./js/entries/plugins/foundation.util.keyboard.js":
|
111
|
-
/*!********************************************************!*\
|
112
|
-
!*** ./js/entries/plugins/foundation.util.keyboard.js ***!
|
113
|
-
\********************************************************/
|
114
|
-
/*! exports provided: Foundation, Keyboard */
|
115
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
116
|
-
|
117
|
-
"use strict";
|
118
|
-
__webpack_require__.r(__webpack_exports__);
|
119
|
-
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core");
|
120
|
-
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);
|
121
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; });
|
122
|
-
|
123
|
-
/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.keyboard */ "./js/foundation.util.keyboard.js");
|
124
|
-
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Keyboard", function() { return _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"]; });
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
_foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].Keyboard = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__["Keyboard"];
|
129
|
-
|
130
|
-
|
131
|
-
/***/ }),
|
10
|
+
})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {
|
11
|
+
return /******/ (function() { // webpackBootstrap
|
12
|
+
/******/ "use strict";
|
13
|
+
/******/ var __webpack_modules__ = ({
|
132
14
|
|
133
15
|
/***/ "./js/foundation.util.keyboard.js":
|
134
16
|
/*!****************************************!*\
|
135
17
|
!*** ./js/foundation.util.keyboard.js ***!
|
136
18
|
\****************************************/
|
137
|
-
|
138
|
-
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
19
|
+
/***/ (function(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
139
20
|
|
140
|
-
"use strict";
|
141
21
|
__webpack_require__.r(__webpack_exports__);
|
142
|
-
/* harmony export
|
22
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
23
|
+
/* harmony export */ Keyboard: function() { return /* binding */ Keyboard; }
|
24
|
+
/* harmony export */ });
|
143
25
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
144
26
|
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
145
27
|
/* harmony import */ var _foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.core.utils */ "./foundation.core");
|
@@ -154,7 +36,6 @@ __webpack_require__.r(__webpack_exports__);
|
|
154
36
|
|
155
37
|
|
156
38
|
|
157
|
-
|
158
39
|
var keyCodes = {
|
159
40
|
9: 'TAB',
|
160
41
|
13: 'ENTER',
|
@@ -167,38 +48,60 @@ var keyCodes = {
|
|
167
48
|
39: 'ARROW_RIGHT',
|
168
49
|
40: 'ARROW_DOWN'
|
169
50
|
};
|
170
|
-
var commands = {};
|
51
|
+
var commands = {};
|
171
52
|
|
53
|
+
// Functions pulled out to be referenceable from internals
|
172
54
|
function findFocusable($element) {
|
173
55
|
if (!$element) {
|
174
56
|
return false;
|
175
57
|
}
|
176
|
-
|
177
58
|
return $element.find('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]').filter(function () {
|
178
59
|
if (!jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).is(':visible') || jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).attr('tabindex') < 0) {
|
179
60
|
return false;
|
180
61
|
} //only have visible elements and those that have a tabindex greater or equal 0
|
181
|
-
|
182
|
-
|
183
62
|
return true;
|
63
|
+
}).sort(function (a, b) {
|
64
|
+
if (jquery__WEBPACK_IMPORTED_MODULE_0___default()(a).attr('tabindex') === jquery__WEBPACK_IMPORTED_MODULE_0___default()(b).attr('tabindex')) {
|
65
|
+
return 0;
|
66
|
+
}
|
67
|
+
var aTabIndex = parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()(a).attr('tabindex'), 10),
|
68
|
+
bTabIndex = parseInt(jquery__WEBPACK_IMPORTED_MODULE_0___default()(b).attr('tabindex'), 10);
|
69
|
+
// Undefined is treated the same as 0
|
70
|
+
if (typeof jquery__WEBPACK_IMPORTED_MODULE_0___default()(a).attr('tabindex') === 'undefined' && bTabIndex > 0) {
|
71
|
+
return 1;
|
72
|
+
}
|
73
|
+
if (typeof jquery__WEBPACK_IMPORTED_MODULE_0___default()(b).attr('tabindex') === 'undefined' && aTabIndex > 0) {
|
74
|
+
return -1;
|
75
|
+
}
|
76
|
+
if (aTabIndex === 0 && bTabIndex > 0) {
|
77
|
+
return 1;
|
78
|
+
}
|
79
|
+
if (bTabIndex === 0 && aTabIndex > 0) {
|
80
|
+
return -1;
|
81
|
+
}
|
82
|
+
if (aTabIndex < bTabIndex) {
|
83
|
+
return -1;
|
84
|
+
}
|
85
|
+
if (aTabIndex > bTabIndex) {
|
86
|
+
return 1;
|
87
|
+
}
|
184
88
|
});
|
185
89
|
}
|
186
|
-
|
187
90
|
function parseKey(event) {
|
188
|
-
var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase();
|
91
|
+
var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase();
|
189
92
|
|
93
|
+
// Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events
|
190
94
|
key = key.replace(/\W+/, '');
|
191
95
|
if (event.shiftKey) key = "SHIFT_".concat(key);
|
192
96
|
if (event.ctrlKey) key = "CTRL_".concat(key);
|
193
|
-
if (event.altKey) key = "ALT_".concat(key);
|
97
|
+
if (event.altKey) key = "ALT_".concat(key);
|
194
98
|
|
99
|
+
// Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`)
|
195
100
|
key = key.replace(/_$/, '');
|
196
101
|
return key;
|
197
102
|
}
|
198
|
-
|
199
103
|
var Keyboard = {
|
200
104
|
keys: getKeyCodes(keyCodes),
|
201
|
-
|
202
105
|
/**
|
203
106
|
* Parses the (keyboard) event and returns a String that represents its key
|
204
107
|
* Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE
|
@@ -206,7 +109,6 @@ var Keyboard = {
|
|
206
109
|
* @return String key - String that represents the key pressed
|
207
110
|
*/
|
208
111
|
parseKey: parseKey,
|
209
|
-
|
210
112
|
/**
|
211
113
|
* Handles the given (keyboard) event
|
212
114
|
* @param {Event} event - the event generated by the event handler
|
@@ -215,29 +117,32 @@ var Keyboard = {
|
|
215
117
|
*/
|
216
118
|
handleKey: function handleKey(event, component, functions) {
|
217
119
|
var commandList = commands[component],
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
if (!commandList) return console.warn('Component not defined!');
|
120
|
+
keyCode = this.parseKey(event),
|
121
|
+
cmds,
|
122
|
+
command,
|
123
|
+
fn;
|
124
|
+
if (!commandList) return console.warn('Component not defined!');
|
223
125
|
|
224
|
-
|
126
|
+
// Ignore the event if it was already handled
|
127
|
+
if (event.zfIsKeyHandled === true) return;
|
225
128
|
|
129
|
+
// This component does not differentiate between ltr and rtl
|
226
130
|
if (typeof commandList.ltr === 'undefined') {
|
227
131
|
cmds = commandList; // use plain list
|
228
132
|
} else {
|
229
133
|
// merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa
|
230
|
-
if (
|
134
|
+
if ((0,_foundation_core_utils__WEBPACK_IMPORTED_MODULE_1__.rtl)()) cmds = jquery__WEBPACK_IMPORTED_MODULE_0___default().extend({}, commandList.ltr, commandList.rtl);else cmds = jquery__WEBPACK_IMPORTED_MODULE_0___default().extend({}, commandList.rtl, commandList.ltr);
|
231
135
|
}
|
232
|
-
|
233
136
|
command = cmds[keyCode];
|
234
|
-
fn = functions[command];
|
235
|
-
|
137
|
+
fn = functions[command];
|
138
|
+
// Execute the handler if found
|
236
139
|
if (fn && typeof fn === 'function') {
|
237
|
-
var returnValue = fn.apply();
|
140
|
+
var returnValue = fn.apply();
|
238
141
|
|
239
|
-
|
142
|
+
// Mark the event as "handled" to prevent future handlings
|
143
|
+
event.zfIsKeyHandled = true;
|
240
144
|
|
145
|
+
// Execute function when event was handled
|
241
146
|
if (functions.handled || typeof functions.handled === 'function') {
|
242
147
|
functions.handled(returnValue);
|
243
148
|
}
|
@@ -248,14 +153,13 @@ var Keyboard = {
|
|
248
153
|
}
|
249
154
|
}
|
250
155
|
},
|
251
|
-
|
252
156
|
/**
|
253
157
|
* Finds all focusable elements within the given `$element`
|
254
158
|
* @param {jQuery} $element - jQuery object to search within
|
255
159
|
* @return {jQuery} $focusable - all focusable elements within `$element`
|
256
160
|
*/
|
257
|
-
findFocusable: findFocusable,
|
258
161
|
|
162
|
+
findFocusable: findFocusable,
|
259
163
|
/**
|
260
164
|
* Returns the component name name
|
261
165
|
* @param {Object} component - Foundation component, e.g. Slider or Reveal
|
@@ -266,15 +170,14 @@ var Keyboard = {
|
|
266
170
|
},
|
267
171
|
// TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context?
|
268
172
|
//
|
269
|
-
|
270
173
|
/**
|
271
174
|
* Traps the focus in the given element.
|
272
175
|
* @param {jQuery} $element jQuery object to trap the foucs into.
|
273
176
|
*/
|
274
177
|
trapFocus: function trapFocus($element) {
|
275
178
|
var $focusable = findFocusable($element),
|
276
|
-
|
277
|
-
|
179
|
+
$firstFocusable = $focusable.eq(0),
|
180
|
+
$lastFocusable = $focusable.eq(-1);
|
278
181
|
$element.on('keydown.zf.trapfocus', function (event) {
|
279
182
|
if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') {
|
280
183
|
event.preventDefault();
|
@@ -285,7 +188,6 @@ var Keyboard = {
|
|
285
188
|
}
|
286
189
|
});
|
287
190
|
},
|
288
|
-
|
289
191
|
/**
|
290
192
|
* Releases the trapped focus from the given element.
|
291
193
|
* @param {jQuery} $element jQuery object to release the focus for.
|
@@ -294,34 +196,29 @@ var Keyboard = {
|
|
294
196
|
$element.off('keydown.zf.trapfocus');
|
295
197
|
}
|
296
198
|
};
|
199
|
+
|
297
200
|
/*
|
298
201
|
* Constants for easier comparing.
|
299
202
|
* Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE
|
300
203
|
*/
|
301
|
-
|
302
204
|
function getKeyCodes(kcs) {
|
303
205
|
var k = {};
|
304
|
-
|
305
206
|
for (var kc in kcs) {
|
306
|
-
k[kcs[kc]] = kcs[kc];
|
207
|
+
if (kcs.hasOwnProperty(kc)) k[kcs[kc]] = kcs[kc];
|
307
208
|
}
|
308
|
-
|
309
209
|
return k;
|
310
210
|
}
|
311
211
|
|
312
212
|
|
313
|
-
|
314
213
|
/***/ }),
|
315
214
|
|
316
|
-
/***/
|
317
|
-
|
318
|
-
!***
|
319
|
-
|
320
|
-
|
321
|
-
/***/ (function(module, exports, __webpack_require__) {
|
322
|
-
|
323
|
-
module.exports = __webpack_require__(/*! /Volumes/Data/Development/Foundation/foundation-sites/js/entries/plugins/foundation.util.keyboard.js */"./js/entries/plugins/foundation.util.keyboard.js");
|
215
|
+
/***/ "./foundation.core":
|
216
|
+
/*!****************************************************************************************************************************************************************!*\
|
217
|
+
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***!
|
218
|
+
\****************************************************************************************************************************************************************/
|
219
|
+
/***/ (function(module) {
|
324
220
|
|
221
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
|
325
222
|
|
326
223
|
/***/ }),
|
327
224
|
|
@@ -329,13 +226,101 @@ module.exports = __webpack_require__(/*! /Volumes/Data/Development/Foundation/fo
|
|
329
226
|
/*!********************************************************************************************!*\
|
330
227
|
!*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***!
|
331
228
|
\********************************************************************************************/
|
332
|
-
|
333
|
-
/***/ (function(module, exports) {
|
229
|
+
/***/ (function(module) {
|
334
230
|
|
335
231
|
module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
|
336
232
|
|
337
233
|
/***/ })
|
338
234
|
|
339
|
-
/******/
|
235
|
+
/******/ });
|
236
|
+
/************************************************************************/
|
237
|
+
/******/ // The module cache
|
238
|
+
/******/ var __webpack_module_cache__ = {};
|
239
|
+
/******/
|
240
|
+
/******/ // The require function
|
241
|
+
/******/ function __webpack_require__(moduleId) {
|
242
|
+
/******/ // Check if module is in cache
|
243
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
244
|
+
/******/ if (cachedModule !== undefined) {
|
245
|
+
/******/ return cachedModule.exports;
|
246
|
+
/******/ }
|
247
|
+
/******/ // Create a new module (and put it into the cache)
|
248
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
249
|
+
/******/ // no module.id needed
|
250
|
+
/******/ // no module.loaded needed
|
251
|
+
/******/ exports: {}
|
252
|
+
/******/ };
|
253
|
+
/******/
|
254
|
+
/******/ // Execute the module function
|
255
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
256
|
+
/******/
|
257
|
+
/******/ // Return the exports of the module
|
258
|
+
/******/ return module.exports;
|
259
|
+
/******/ }
|
260
|
+
/******/
|
261
|
+
/************************************************************************/
|
262
|
+
/******/ /* webpack/runtime/compat get default export */
|
263
|
+
/******/ !function() {
|
264
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
265
|
+
/******/ __webpack_require__.n = function(module) {
|
266
|
+
/******/ var getter = module && module.__esModule ?
|
267
|
+
/******/ function() { return module['default']; } :
|
268
|
+
/******/ function() { return module; };
|
269
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
270
|
+
/******/ return getter;
|
271
|
+
/******/ };
|
272
|
+
/******/ }();
|
273
|
+
/******/
|
274
|
+
/******/ /* webpack/runtime/define property getters */
|
275
|
+
/******/ !function() {
|
276
|
+
/******/ // define getter functions for harmony exports
|
277
|
+
/******/ __webpack_require__.d = function(exports, definition) {
|
278
|
+
/******/ for(var key in definition) {
|
279
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
280
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
281
|
+
/******/ }
|
282
|
+
/******/ }
|
283
|
+
/******/ };
|
284
|
+
/******/ }();
|
285
|
+
/******/
|
286
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
287
|
+
/******/ !function() {
|
288
|
+
/******/ __webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }
|
289
|
+
/******/ }();
|
290
|
+
/******/
|
291
|
+
/******/ /* webpack/runtime/make namespace object */
|
292
|
+
/******/ !function() {
|
293
|
+
/******/ // define __esModule on exports
|
294
|
+
/******/ __webpack_require__.r = function(exports) {
|
295
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
296
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
297
|
+
/******/ }
|
298
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
299
|
+
/******/ };
|
300
|
+
/******/ }();
|
301
|
+
/******/
|
302
|
+
/************************************************************************/
|
303
|
+
var __webpack_exports__ = {};
|
304
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
305
|
+
!function() {
|
306
|
+
/*!********************************************************!*\
|
307
|
+
!*** ./js/entries/plugins/foundation.util.keyboard.js ***!
|
308
|
+
\********************************************************/
|
309
|
+
__webpack_require__.r(__webpack_exports__);
|
310
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
311
|
+
/* harmony export */ Foundation: function() { return /* reexport safe */ _foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation; },
|
312
|
+
/* harmony export */ Keyboard: function() { return /* reexport safe */ _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__.Keyboard; }
|
313
|
+
/* harmony export */ });
|
314
|
+
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core");
|
315
|
+
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);
|
316
|
+
/* harmony import */ var _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.keyboard */ "./js/foundation.util.keyboard.js");
|
317
|
+
|
318
|
+
|
319
|
+
_foundation_core__WEBPACK_IMPORTED_MODULE_0__.Foundation.Keyboard = _foundation_util_keyboard__WEBPACK_IMPORTED_MODULE_1__.Keyboard;
|
320
|
+
|
321
|
+
}();
|
322
|
+
/******/ return __webpack_exports__;
|
323
|
+
/******/ })()
|
324
|
+
;
|
340
325
|
});
|
341
326
|
//# sourceMappingURL=foundation.util.keyboard.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/universalModuleDefinition","webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/bootstrap","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/entries/plugins/foundation.util.keyboard.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.util.keyboard.js","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}"],"names":["Foundation","Keyboard","keyCodes","commands","findFocusable","$element","find","filter","$","is","attr","parseKey","event","key","which","keyCode","String","fromCharCode","toUpperCase","replace","shiftKey","ctrlKey","altKey","keys","getKeyCodes","handleKey","component","functions","commandList","cmds","command","fn","console","warn","zfIsKeyHandled","ltr","Rtl","extend","rtl","returnValue","apply","handled","unhandled","register","componentName","trapFocus","$focusable","$firstFocusable","eq","$lastFocusable","on","target","preventDefault","focus","releaseFocus","off","kcs","k","kc"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iCAAiC;AAC1E,wHAAgH,mBAAmB,EAAE;AACrI;AACA;;AAEA;AACA;AACA;AACA,mCAA2B,0BAA0B,EAAE;AACvD,yCAAiC,eAAe;AAChD;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AAe,CAACM,KAAhB;AACD,OAHD,MAIK,IAAIzC,KAAK,CAACuC,MAAN,KAAiBJ,eAAe,CAAC,CAAD,CAAhC,IAAuCpC,QAAQ,CAACC,KAAD,CAAR,KAAoB,WAA/D,EAA4E;AAC/EA,aAAK,CAACwC,cAAN;AACAH,sBAAc,CAACI,KAAf;AACD;AACF,KATD;AAUD,GAnGY;;AAoGb;;;;AAIAC,cAxGa,wBAwGAjD,QAxGA,EAwGU;AACrBA,YAAQ,CAACkD,GAAT,CAAa,sBAAb;AACD;AA1GY,CAAf;AA6GA;;;;;AAIA,SAAS/B,WAAT,CAAqBgC,GAArB,EAA0B;AACxB,MAAIC,CAAC,GAAG,EAAR;;AACA,OAAK,IAAIC,EAAT,IAAeF,GAAf;AAAoBC,KAAC,CAACD,GAAG,CAACE,EAAD,CAAJ,CAAD,GAAaF,GAAG,CAACE,EAAD,CAAhB;AAApB;;AACA,SAAOD,CAAP;AACD;;;;;;;;;;;;;;;;;;;;;;;;;AC1KD,oD","file":"foundation.util.keyboard.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.util.keyboard\"] = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.keyboard\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"jQuery\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 23);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","import { Foundation } from './foundation.core';\nimport { Keyboard } from '../../foundation.util.keyboard';\n\nFoundation.Keyboard = Keyboard;\n\nexport { Foundation, Keyboard };\n","/*******************************************\n * *\n * This util was created by Marius Olbertz *\n * Please thank Marius on GitHub /owlbertz *\n * or the web http://www.mariusolbertz.de/ *\n * *\n ******************************************/\n\n'use strict';\n\nimport $ from 'jquery';\nimport { rtl as Rtl } from './foundation.core.utils';\n\nconst keyCodes = {\n 9: 'TAB',\n 13: 'ENTER',\n 27: 'ESCAPE',\n 32: 'SPACE',\n 35: 'END',\n 36: 'HOME',\n 37: 'ARROW_LEFT',\n 38: 'ARROW_UP',\n 39: 'ARROW_RIGHT',\n 40: 'ARROW_DOWN'\n}\n\nvar commands = {}\n\n// Functions pulled out to be referenceable from internals\nfunction findFocusable($element) {\n if(!$element) {return false; }\n return $element.find('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]').filter(function() {\n if (!$(this).is(':visible') || $(this).attr('tabindex') < 0) { return false; } //only have visible elements and those that have a tabindex greater or equal 0\n return true;\n });\n}\n\nfunction parseKey(event) {\n var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase();\n\n // Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events\n key = key.replace(/\\W+/, '');\n\n if (event.shiftKey) key = `SHIFT_${key}`;\n if (event.ctrlKey) key = `CTRL_${key}`;\n if (event.altKey) key = `ALT_${key}`;\n\n // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`)\n key = key.replace(/_$/, '');\n\n return key;\n}\n\nvar Keyboard = {\n keys: getKeyCodes(keyCodes),\n\n /**\n * Parses the (keyboard) event and returns a String that represents its key\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n * @param {Event} event - the event generated by the event handler\n * @return String key - String that represents the key pressed\n */\n parseKey: parseKey,\n\n /**\n * Handles the given (keyboard) event\n * @param {Event} event - the event generated by the event handler\n * @param {String} component - Foundation component's name, e.g. Slider or Reveal\n * @param {Objects} functions - collection of functions that are to be executed\n */\n handleKey(event, component, functions) {\n var commandList = commands[component],\n keyCode = this.parseKey(event),\n cmds,\n command,\n fn;\n\n if (!commandList) return console.warn('Component not defined!');\n\n // Ignore the event if it was already handled\n if (event.zfIsKeyHandled === true) return;\n\n // This component does not differentiate between ltr and rtl\n if (typeof commandList.ltr === 'undefined') {\n cmds = commandList; // use plain list\n } else { // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa\n if (Rtl()) cmds = $.extend({}, commandList.ltr, commandList.rtl);\n\n else cmds = $.extend({}, commandList.rtl, commandList.ltr);\n }\n command = cmds[keyCode];\n\n fn = functions[command];\n // Execute the handler if found\n if (fn && typeof fn === 'function') {\n var returnValue = fn.apply();\n\n // Mark the event as \"handled\" to prevent future handlings\n event.zfIsKeyHandled = true;\n\n // Execute function when event was handled\n if (functions.handled || typeof functions.handled === 'function') {\n functions.handled(returnValue);\n }\n } else {\n // Execute function when event was not handled\n if (functions.unhandled || typeof functions.unhandled === 'function') {\n functions.unhandled();\n }\n }\n },\n\n /**\n * Finds all focusable elements within the given `$element`\n * @param {jQuery} $element - jQuery object to search within\n * @return {jQuery} $focusable - all focusable elements within `$element`\n */\n\n findFocusable: findFocusable,\n\n /**\n * Returns the component name name\n * @param {Object} component - Foundation component, e.g. Slider or Reveal\n * @return String componentName\n */\n\n register(componentName, cmds) {\n commands[componentName] = cmds;\n },\n\n\n // TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context?\n //\n /**\n * Traps the focus in the given element.\n * @param {jQuery} $element jQuery object to trap the foucs into.\n */\n trapFocus($element) {\n var $focusable = findFocusable($element),\n $firstFocusable = $focusable.eq(0),\n $lastFocusable = $focusable.eq(-1);\n\n $element.on('keydown.zf.trapfocus', function(event) {\n if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') {\n event.preventDefault();\n $firstFocusable.focus();\n }\n else if (event.target === $firstFocusable[0] && parseKey(event) === 'SHIFT_TAB') {\n event.preventDefault();\n $lastFocusable.focus();\n }\n });\n },\n /**\n * Releases the trapped focus from the given element.\n * @param {jQuery} $element jQuery object to release the focus for.\n */\n releaseFocus($element) {\n $element.off('keydown.zf.trapfocus');\n }\n}\n\n/*\n * Constants for easier comparing.\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n */\nfunction getKeyCodes(kcs) {\n var k = {};\n for (var kc in kcs) k[kcs[kc]] = kcs[kc];\n return k;\n}\n\nexport {Keyboard};\n","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;"],"sourceRoot":""}
|
1
|
+
{"version":3,"file":"foundation.util.keyboard.js","mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE,CAAC;AACD,O;;;;;;;;;;;;;;;;;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEuB;AAC8B;AAErD,IAAMG,QAAQ,GAAG;EACf,CAAC,EAAE,KAAK;EACR,EAAE,EAAE,OAAO;EACX,EAAE,EAAE,QAAQ;EACZ,EAAE,EAAE,OAAO;EACX,EAAE,EAAE,KAAK;EACT,EAAE,EAAE,MAAM;EACV,EAAE,EAAE,YAAY;EAChB,EAAE,EAAE,UAAU;EACd,EAAE,EAAE,aAAa;EACjB,EAAE,EAAE;AACN,CAAC;AAED,IAAIC,QAAQ,GAAG,CAAC,CAAC;;AAEjB;AACA,SAASC,aAAa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AA;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;ACN+C;AACW;AAE1DG,wDAAU,CAACpC,QAAQ,GAAGA,+DAAQ","sources":["webpack://__FOUNDATION_EXTERNAL__/webpack/universalModuleDefinition","webpack://__FOUNDATION_EXTERNAL__/./js/foundation.util.keyboard.js","webpack://__FOUNDATION_EXTERNAL__/external umd {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"}","webpack://__FOUNDATION_EXTERNAL__/external umd {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}","webpack://__FOUNDATION_EXTERNAL__/webpack/bootstrap","webpack://__FOUNDATION_EXTERNAL__/webpack/runtime/compat get default export","webpack://__FOUNDATION_EXTERNAL__/webpack/runtime/define property getters","webpack://__FOUNDATION_EXTERNAL__/webpack/runtime/hasOwnProperty shorthand","webpack://__FOUNDATION_EXTERNAL__/webpack/runtime/make namespace object","webpack://__FOUNDATION_EXTERNAL__/./js/entries/plugins/foundation.util.keyboard.js"],"sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"__FOUNDATION_EXTERNAL__\"] = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.keyboard\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"jQuery\"]);\n})(self, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {\nreturn ","/*******************************************\n * *\n * This util was created by Marius Olbertz *\n * Please thank Marius on GitHub /owlbertz *\n * or the web http://www.mariusolbertz.de/ *\n * *\n ******************************************/\n\nimport $ from 'jquery';\nimport { rtl as Rtl } from './foundation.core.utils';\n\nconst keyCodes = {\n 9: 'TAB',\n 13: 'ENTER',\n 27: 'ESCAPE',\n 32: 'SPACE',\n 35: 'END',\n 36: 'HOME',\n 37: 'ARROW_LEFT',\n 38: 'ARROW_UP',\n 39: 'ARROW_RIGHT',\n 40: 'ARROW_DOWN'\n}\n\nvar commands = {}\n\n// Functions pulled out to be referenceable from internals\nfunction findFocusable($element) {\n if(!$element) {return false; }\n return $element.find('a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]').filter(function() {\n if (!$(this).is(':visible') || $(this).attr('tabindex') < 0) { return false; } //only have visible elements and those that have a tabindex greater or equal 0\n return true;\n })\n .sort( function( a, b ) {\n if ($(a).attr('tabindex') === $(b).attr('tabindex')) {\n return 0;\n }\n let aTabIndex = parseInt($(a).attr('tabindex'), 10),\n bTabIndex = parseInt($(b).attr('tabindex'), 10);\n // Undefined is treated the same as 0\n if (typeof $(a).attr('tabindex') === 'undefined' && bTabIndex > 0) {\n return 1;\n }\n if (typeof $(b).attr('tabindex') === 'undefined' && aTabIndex > 0) {\n return -1;\n }\n if (aTabIndex === 0 && bTabIndex > 0) {\n return 1;\n }\n if (bTabIndex === 0 && aTabIndex > 0) {\n return -1;\n }\n if (aTabIndex < bTabIndex) {\n return -1;\n }\n if (aTabIndex > bTabIndex) {\n return 1;\n }\n });\n}\n\nfunction parseKey(event) {\n var key = keyCodes[event.which || event.keyCode] || String.fromCharCode(event.which).toUpperCase();\n\n // Remove un-printable characters, e.g. for `fromCharCode` calls for CTRL only events\n key = key.replace(/\\W+/, '');\n\n if (event.shiftKey) key = `SHIFT_${key}`;\n if (event.ctrlKey) key = `CTRL_${key}`;\n if (event.altKey) key = `ALT_${key}`;\n\n // Remove trailing underscore, in case only modifiers were used (e.g. only `CTRL_ALT`)\n key = key.replace(/_$/, '');\n\n return key;\n}\n\nvar Keyboard = {\n keys: getKeyCodes(keyCodes),\n\n /**\n * Parses the (keyboard) event and returns a String that represents its key\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n * @param {Event} event - the event generated by the event handler\n * @return String key - String that represents the key pressed\n */\n parseKey: parseKey,\n\n /**\n * Handles the given (keyboard) event\n * @param {Event} event - the event generated by the event handler\n * @param {String} component - Foundation component's name, e.g. Slider or Reveal\n * @param {Objects} functions - collection of functions that are to be executed\n */\n handleKey(event, component, functions) {\n var commandList = commands[component],\n keyCode = this.parseKey(event),\n cmds,\n command,\n fn;\n\n if (!commandList) return console.warn('Component not defined!');\n\n // Ignore the event if it was already handled\n if (event.zfIsKeyHandled === true) return;\n\n // This component does not differentiate between ltr and rtl\n if (typeof commandList.ltr === 'undefined') {\n cmds = commandList; // use plain list\n } else { // merge ltr and rtl: if document is rtl, rtl overwrites ltr and vice versa\n if (Rtl()) cmds = $.extend({}, commandList.ltr, commandList.rtl);\n\n else cmds = $.extend({}, commandList.rtl, commandList.ltr);\n }\n command = cmds[keyCode];\n\n fn = functions[command];\n // Execute the handler if found\n if (fn && typeof fn === 'function') {\n var returnValue = fn.apply();\n\n // Mark the event as \"handled\" to prevent future handlings\n event.zfIsKeyHandled = true;\n\n // Execute function when event was handled\n if (functions.handled || typeof functions.handled === 'function') {\n functions.handled(returnValue);\n }\n } else {\n // Execute function when event was not handled\n if (functions.unhandled || typeof functions.unhandled === 'function') {\n functions.unhandled();\n }\n }\n },\n\n /**\n * Finds all focusable elements within the given `$element`\n * @param {jQuery} $element - jQuery object to search within\n * @return {jQuery} $focusable - all focusable elements within `$element`\n */\n\n findFocusable: findFocusable,\n\n /**\n * Returns the component name name\n * @param {Object} component - Foundation component, e.g. Slider or Reveal\n * @return String componentName\n */\n\n register(componentName, cmds) {\n commands[componentName] = cmds;\n },\n\n\n // TODO9438: These references to Keyboard need to not require global. Will 'this' work in this context?\n //\n /**\n * Traps the focus in the given element.\n * @param {jQuery} $element jQuery object to trap the foucs into.\n */\n trapFocus($element) {\n var $focusable = findFocusable($element),\n $firstFocusable = $focusable.eq(0),\n $lastFocusable = $focusable.eq(-1);\n\n $element.on('keydown.zf.trapfocus', function(event) {\n if (event.target === $lastFocusable[0] && parseKey(event) === 'TAB') {\n event.preventDefault();\n $firstFocusable.focus();\n }\n else if (event.target === $firstFocusable[0] && parseKey(event) === 'SHIFT_TAB') {\n event.preventDefault();\n $lastFocusable.focus();\n }\n });\n },\n /**\n * Releases the trapped focus from the given element.\n * @param {jQuery} $element jQuery object to release the focus for.\n */\n releaseFocus($element) {\n $element.off('keydown.zf.trapfocus');\n }\n}\n\n/*\n * Constants for easier comparing.\n * Can be used like Foundation.parseKey(event) === Foundation.keys.SPACE\n */\nfunction getKeyCodes(kcs) {\n var k = {};\n for (var kc in kcs) {\n if (kcs.hasOwnProperty(kc)) k[kcs[kc]] = kcs[kc];\n }\n return k;\n}\n\nexport {Keyboard};\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { Foundation } from './foundation.core';\nimport { Keyboard } from '../../foundation.util.keyboard';\n\nFoundation.Keyboard = Keyboard;\n\nexport { Foundation, Keyboard };\n"],"names":["$","rtl","Rtl","keyCodes","commands","findFocusable","$element","find","filter","is","attr","sort","a","b","aTabIndex","parseInt","bTabIndex","parseKey","event","key","which","keyCode","String","fromCharCode","toUpperCase","replace","shiftKey","concat","ctrlKey","altKey","Keyboard","keys","getKeyCodes","handleKey","component","functions","commandList","cmds","command","fn","console","warn","zfIsKeyHandled","ltr","extend","returnValue","apply","handled","unhandled","register","componentName","trapFocus","$focusable","$firstFocusable","eq","$lastFocusable","on","target","preventDefault","focus","releaseFocus","off","kcs","k","kc","hasOwnProperty","Foundation"],"sourceRoot":""}
|
@@ -1,2 +1,2 @@
|
|
1
|
-
|
1
|
+
((e,t)=>{"object"==typeof exports&&"object"==typeof module?module.exports=t(require("./foundation.core"),require("jquery")):"function"==typeof define&&define.amd?define(["./foundation.core","jquery"],t):"object"==typeof exports?exports.__FOUNDATION_EXTERNAL__=t(require("./foundation.core"),require("jquery")):(e.__FOUNDATION_EXTERNAL__=e.__FOUNDATION_EXTERNAL__||{},e.__FOUNDATION_EXTERNAL__["foundation.util.keyboard"]=t(e.__FOUNDATION_EXTERNAL__["foundation.core"],e.jQuery))})(self,function(t,n){return r={"./js/foundation.util.keyboard.js":function(e,t,n){n.r(t),n.d(t,{Keyboard:function(){return f}});var t=n("jquery"),r=n.n(t),a=n("./foundation.core"),o={9:"TAB",13:"ENTER",27:"ESCAPE",32:"SPACE",35:"END",36:"HOME",37:"ARROW_LEFT",38:"ARROW_UP",39:"ARROW_RIGHT",40:"ARROW_DOWN"},i={};function u(e){return!!e&&e.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter(function(){return!(!r()(this).is(":visible")||r()(this).attr("tabindex")<0)}).sort(function(e,t){var n,o;return r()(e).attr("tabindex")===r()(t).attr("tabindex")?0:(n=parseInt(r()(e).attr("tabindex"),10),o=parseInt(r()(t).attr("tabindex"),10),void 0===r()(e).attr("tabindex")&&0<o?1:void 0===r()(t).attr("tabindex")&&0<n?-1:0===n&&0<o?1:0===o&&0<n||n<o?-1:o<n?1:void 0)})}function d(e){var t=(t=o[e.which||e.keyCode]||String.fromCharCode(e.which).toUpperCase()).replace(/\W+/,"");return e.shiftKey&&(t="SHIFT_".concat(t)),e.ctrlKey&&(t="CTRL_".concat(t)),t=(t=e.altKey?"ALT_".concat(t):t).replace(/_$/,"")}var f={keys:(e=>{var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=e[t]);return n})(o),parseKey:d,handleKey:function(e,t,n){var t=i[t],o=this.parseKey(e);if(!t)return console.warn("Component not defined!");!0!==e.zfIsKeyHandled&&((t=n[(void 0===t.ltr?t:(0,a.rtl)()?r().extend({},t.ltr,t.rtl):r().extend({},t.rtl,t.ltr))[o]])&&"function"==typeof t?(o=t.apply(),e.zfIsKeyHandled=!0,!n.handled&&"function"!=typeof n.handled||n.handled(o)):!n.unhandled&&"function"!=typeof n.unhandled||n.unhandled())},findFocusable:u,register:function(e,t){i[e]=t},trapFocus:function(e){var t=u(e),n=t.eq(0),o=t.eq(-1);e.on("keydown.zf.trapfocus",function(e){e.target===o[0]&&"TAB"===d(e)?(e.preventDefault(),n.focus()):e.target===n[0]&&"SHIFT_TAB"===d(e)&&(e.preventDefault(),o.focus())})},releaseFocus:function(e){e.off("keydown.zf.trapfocus")}}},"./foundation.core":function(e){e.exports=t},jquery:function(e){e.exports=n}},a={},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,{a:t}),t},o.d=function(e,t){for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u={},(o.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(u),o.d(u,{Foundation:function(){return e.Foundation},Keyboard:function(){return i.Keyboard}}),e=o("./foundation.core"),i=o("./js/foundation.util.keyboard.js"),e.Foundation.Keyboard=i.Keyboard,u;function o(e){var t=a[e];return void 0!==t||(t=a[e]={exports:{}},r[e](t,t.exports,o)),t.exports}var r,a,e,i,u});
|
2
2
|
//# sourceMappingURL=foundation.util.keyboard.min.js.map
|