foundation-rails 5.5.3.2 → 6.6.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -2
- data/.ruby-version +1 -1
- data/.travis.yml +17 -4
- data/Appraisals +19 -0
- data/Gemfile +5 -2
- data/Gemfile.lock +210 -0
- data/LICENSE.txt +1 -1
- data/README.md +64 -28
- data/Rakefile +30 -0
- data/app/views/foundation/rails/styleguide/show.html.erb +10 -13
- data/bower.json +3 -2
- data/foundation-rails.gemspec +12 -7
- data/gemfiles/rails_4.1.gemfile +10 -0
- data/gemfiles/rails_4.1.gemfile.lock +181 -0
- data/gemfiles/rails_4.2.gemfile +10 -0
- data/gemfiles/rails_4.2.gemfile.lock +181 -0
- data/gemfiles/rails_5.0.gemfile +10 -0
- data/gemfiles/rails_5.0.gemfile.lock +196 -0
- data/gemfiles/rails_5.1.gemfile +10 -0
- data/gemfiles/rails_5.1.gemfile.lock +196 -0
- data/gemfiles/rails_5.2.gemfile +10 -0
- data/gemfiles/rails_5.2.gemfile.lock +196 -0
- data/lib/foundation/rails/engine.rb +2 -3
- data/lib/foundation/rails/version.rb +1 -1
- data/lib/foundation-rails.rb +1 -0
- data/lib/generators/foundation/install_generator.rb +39 -27
- data/lib/generators/foundation/templates/_settings.scss +895 -0
- data/lib/generators/foundation/templates/application.html.erb +1 -2
- data/lib/generators/foundation/templates/application.html.haml +2 -4
- data/lib/generators/foundation/templates/application.html.slim +1 -3
- data/lib/generators/foundation/templates/browserslist +4 -0
- data/lib/generators/foundation/templates/foundation_and_overrides.scss +56 -0
- data/spec/features/generator_spec.rb +1 -1
- data/spec/support/helpers.rb +8 -2
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_contain.scss +31 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_purge.scss +38 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_remove.scss +31 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_replace.scss +46 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/functions/_to-list.scss +27 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/helpers/_missing-dependencies.scss +25 -0
- data/vendor/assets/_vendor/sassy-lists/stylesheets/helpers/_true.scss +13 -0
- data/vendor/assets/js/foundation.cjs.js +12529 -0
- data/vendor/assets/js/foundation.cjs.js.map +1 -0
- data/vendor/assets/js/foundation.es6.js +11006 -0
- data/vendor/assets/js/foundation.es6.js.map +1 -0
- data/vendor/assets/js/foundation.esm.js +12490 -0
- data/vendor/assets/js/foundation.esm.js.map +1 -0
- data/vendor/assets/js/foundation.js +13897 -0
- data/vendor/assets/js/foundation.js.map +1 -0
- data/vendor/assets/js/foundation.min.js +2 -0
- data/vendor/assets/js/foundation.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.abide.js +1142 -0
- data/vendor/assets/js/plugins/foundation.abide.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.abide.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.abide.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.accordion.js +661 -0
- data/vendor/assets/js/plugins/foundation.accordion.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.accordion.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.accordion.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.accordionMenu.js +616 -0
- data/vendor/assets/js/plugins/foundation.accordionMenu.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.accordionMenu.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.core.js +1180 -0
- data/vendor/assets/js/plugins/foundation.core.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.core.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.core.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.drilldown.js +968 -0
- data/vendor/assets/js/plugins/foundation.drilldown.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.drilldown.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.drilldown.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.dropdown.js +1328 -0
- data/vendor/assets/js/plugins/foundation.dropdown.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.dropdown.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.dropdown.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js +799 -0
- data/vendor/assets/js/plugins/foundation.dropdownMenu.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.dropdownMenu.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.equalizer.js +614 -0
- data/vendor/assets/js/plugins/foundation.equalizer.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.equalizer.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.equalizer.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.interchange.js +796 -0
- data/vendor/assets/js/plugins/foundation.interchange.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.interchange.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.interchange.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.magellan.js +850 -0
- data/vendor/assets/js/plugins/foundation.magellan.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.magellan.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.magellan.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.offcanvas.js +1318 -0
- data/vendor/assets/js/plugins/foundation.offcanvas.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.offcanvas.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.offcanvas.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.orbit.js +886 -0
- data/vendor/assets/js/plugins/foundation.orbit.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.orbit.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.orbit.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js +585 -0
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.responsiveAccordionTabs.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js +413 -0
- data/vendor/assets/js/plugins/foundation.responsiveMenu.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.responsiveMenu.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js +394 -0
- data/vendor/assets/js/plugins/foundation.responsiveToggle.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.responsiveToggle.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.reveal.js +1275 -0
- data/vendor/assets/js/plugins/foundation.reveal.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.reveal.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.reveal.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.slider.js +1346 -0
- data/vendor/assets/js/plugins/foundation.slider.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.slider.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.slider.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.smoothScroll.js +359 -0
- data/vendor/assets/js/plugins/foundation.smoothScroll.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.smoothScroll.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.smoothScroll.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.sticky.js +1105 -0
- data/vendor/assets/js/plugins/foundation.sticky.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.sticky.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.sticky.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.tabs.js +792 -0
- data/vendor/assets/js/plugins/foundation.tabs.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.tabs.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.tabs.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.toggler.js +704 -0
- data/vendor/assets/js/plugins/foundation.toggler.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.toggler.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.toggler.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.tooltip.js +1333 -0
- data/vendor/assets/js/plugins/foundation.tooltip.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.tooltip.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.tooltip.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.box.js +354 -0
- data/vendor/assets/js/plugins/foundation.util.box.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.box.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.box.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js +218 -0
- data/vendor/assets/js/plugins/foundation.util.imageLoader.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.imageLoader.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.keyboard.js +341 -0
- data/vendor/assets/js/plugins/foundation.util.keyboard.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.keyboard.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.keyboard.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js +509 -0
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.mediaQuery.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.motion.js +274 -0
- data/vendor/assets/js/plugins/foundation.util.motion.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.motion.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.motion.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.nest.js +240 -0
- data/vendor/assets/js/plugins/foundation.util.nest.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.nest.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.nest.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.timer.js +226 -0
- data/vendor/assets/js/plugins/foundation.util.timer.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.timer.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.timer.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.touch.js +365 -0
- data/vendor/assets/js/plugins/foundation.util.touch.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.touch.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.touch.min.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.triggers.js +470 -0
- data/vendor/assets/js/plugins/foundation.util.triggers.js.map +1 -0
- data/vendor/assets/js/plugins/foundation.util.triggers.min.js +2 -0
- data/vendor/assets/js/plugins/foundation.util.triggers.min.js.map +1 -0
- data/vendor/assets/scss/_global.scss +244 -0
- data/vendor/assets/scss/components/_accordion-menu.scss +174 -0
- data/vendor/assets/scss/components/_accordion.scss +164 -0
- data/vendor/assets/scss/components/_badge.scss +63 -0
- data/vendor/assets/scss/components/_breadcrumbs.scss +119 -0
- data/vendor/assets/scss/components/_button-group.scss +304 -0
- data/vendor/assets/scss/components/_button.scss +428 -0
- data/vendor/assets/scss/components/_callout.scss +108 -0
- data/vendor/assets/scss/components/_card.scss +129 -0
- data/vendor/assets/scss/components/_close-button.scss +127 -0
- data/vendor/assets/scss/components/_drilldown.scss +140 -0
- data/vendor/assets/scss/components/_dropdown-menu.scss +279 -0
- data/vendor/assets/scss/components/_dropdown.scss +82 -0
- data/vendor/assets/scss/components/_flex-video.scss +1 -0
- data/vendor/assets/scss/components/_flex.scss +119 -0
- data/vendor/assets/scss/components/_float.scss +27 -0
- data/vendor/assets/scss/components/_label.scss +64 -0
- data/vendor/assets/scss/components/_media-object.scss +114 -0
- data/vendor/assets/scss/components/_menu-icon.scss +9 -0
- data/vendor/assets/scss/components/_menu.scss +495 -0
- data/vendor/assets/scss/components/_off-canvas.scss +511 -0
- data/vendor/assets/scss/components/_orbit.scss +197 -0
- data/vendor/assets/scss/components/_pagination.scss +201 -0
- data/vendor/assets/scss/components/_progress-bar.scss +63 -0
- data/vendor/assets/scss/components/_responsive-embed.scss +57 -0
- data/vendor/assets/scss/components/_reveal.scss +185 -0
- data/vendor/assets/scss/components/_slider.scss +137 -0
- data/vendor/assets/scss/components/_sticky.scss +39 -0
- data/vendor/assets/scss/components/_switch.scss +261 -0
- data/vendor/assets/scss/components/_table.scss +328 -0
- data/vendor/assets/scss/components/_tabs.scss +193 -0
- data/vendor/assets/scss/components/_thumbnail.scss +67 -0
- data/vendor/assets/scss/components/_title-bar.scss +84 -0
- data/vendor/assets/scss/components/_tooltip.scss +160 -0
- data/vendor/assets/scss/components/_top-bar.scss +175 -0
- data/vendor/assets/scss/components/_visibility.scss +135 -0
- data/vendor/assets/scss/forms/_checkbox.scss +41 -0
- data/vendor/assets/scss/forms/_error.scss +89 -0
- data/vendor/assets/scss/forms/_fieldset.scss +53 -0
- data/vendor/assets/scss/forms/_forms.scss +34 -0
- data/vendor/assets/scss/forms/_help-text.scss +30 -0
- data/vendor/assets/scss/forms/_input-group.scss +142 -0
- data/vendor/assets/scss/forms/_label.scss +50 -0
- data/vendor/assets/scss/forms/_meter.scss +116 -0
- data/vendor/assets/scss/forms/_progress.scss +94 -0
- data/vendor/assets/scss/forms/_range.scss +149 -0
- data/vendor/assets/scss/forms/_select.scss +90 -0
- data/vendor/assets/scss/forms/_text.scss +179 -0
- data/vendor/assets/scss/foundation.scss +155 -0
- data/vendor/assets/scss/grid/_classes.scss +189 -0
- data/vendor/assets/scss/grid/_column.scss +78 -0
- data/vendor/assets/scss/grid/_flex-grid.scss +260 -0
- data/vendor/assets/scss/grid/_grid.scss +48 -0
- data/vendor/assets/scss/grid/_gutter.scss +67 -0
- data/vendor/assets/scss/grid/_layout.scss +76 -0
- data/vendor/assets/scss/grid/_position.scss +100 -0
- data/vendor/assets/scss/grid/_row.scss +99 -0
- data/vendor/assets/scss/grid/_size.scss +24 -0
- data/vendor/assets/scss/motion-ui/_classes.scss +109 -0
- data/vendor/assets/scss/motion-ui/_settings.scss +62 -0
- data/vendor/assets/scss/motion-ui/effects/_fade.scss +29 -0
- data/vendor/assets/scss/motion-ui/effects/_hinge.scss +66 -0
- data/vendor/assets/scss/motion-ui/effects/_shake.scss +15 -0
- data/vendor/assets/scss/motion-ui/effects/_slide.scss +42 -0
- data/vendor/assets/scss/motion-ui/effects/_spin.scss +29 -0
- data/vendor/assets/scss/motion-ui/effects/_wiggle.scss +13 -0
- data/vendor/assets/scss/motion-ui/effects/_zoom.scss +15 -0
- data/vendor/assets/scss/motion-ui/motion-ui.scss +31 -0
- data/vendor/assets/scss/motion-ui/transitions/_fade.scss +30 -0
- data/vendor/assets/scss/motion-ui/transitions/_hinge.scss +44 -0
- data/vendor/assets/scss/motion-ui/transitions/_slide.scss +43 -0
- data/vendor/assets/scss/motion-ui/transitions/_spin.scss +40 -0
- data/vendor/assets/scss/motion-ui/transitions/_zoom.scss +41 -0
- data/vendor/assets/scss/motion-ui/util/_animation.scss +7 -0
- data/vendor/assets/scss/motion-ui/util/_args.scss +15 -0
- data/vendor/assets/scss/motion-ui/util/_function.scss +94 -0
- data/vendor/assets/scss/motion-ui/util/_keyframe.scss +136 -0
- data/vendor/assets/scss/motion-ui/util/_selector.scss +23 -0
- data/vendor/assets/scss/motion-ui/util/_series.scss +57 -0
- data/vendor/assets/scss/motion-ui/util/_string.scss +36 -0
- data/vendor/assets/scss/motion-ui/util/_transition.scss +45 -0
- data/vendor/assets/scss/motion-ui/util/_unit.scss +7 -0
- data/vendor/assets/scss/prototype/_arrow.scss +36 -0
- data/vendor/assets/scss/prototype/_border-box.scss +35 -0
- data/vendor/assets/scss/prototype/_border-none.scss +35 -0
- data/vendor/assets/scss/prototype/_bordered.scss +54 -0
- data/vendor/assets/scss/prototype/_box.scss +23 -0
- data/vendor/assets/scss/prototype/_display.scss +50 -0
- data/vendor/assets/scss/prototype/_font-styling.scss +95 -0
- data/vendor/assets/scss/prototype/_list-style-type.scss +95 -0
- data/vendor/assets/scss/prototype/_overflow.scss +72 -0
- data/vendor/assets/scss/prototype/_position.scss +114 -0
- data/vendor/assets/scss/prototype/_prototype.scss +87 -0
- data/vendor/assets/scss/prototype/_relation.scss +157 -0
- data/vendor/assets/scss/prototype/_rotate.scss +31 -0
- data/vendor/assets/scss/prototype/_rounded.scss +61 -0
- data/vendor/assets/scss/prototype/_separator.scss +96 -0
- data/vendor/assets/scss/prototype/_shadow.scss +43 -0
- data/vendor/assets/scss/prototype/_sizing.scss +73 -0
- data/vendor/assets/scss/prototype/_spacing.scss +179 -0
- data/vendor/assets/scss/prototype/_text-decoration.scss +48 -0
- data/vendor/assets/scss/prototype/_text-transformation.scss +48 -0
- data/vendor/assets/scss/prototype/_text-utilities.scss +88 -0
- data/vendor/assets/scss/settings/_settings.scss +895 -0
- data/vendor/assets/scss/typography/_alignment.scss +22 -0
- data/vendor/assets/scss/typography/_base.scss +474 -0
- data/vendor/assets/scss/typography/_helpers.scss +180 -0
- data/vendor/assets/scss/typography/_print.scss +96 -0
- data/vendor/assets/scss/typography/_typography.scss +26 -0
- data/vendor/assets/scss/util/_breakpoint.scss +435 -0
- data/vendor/assets/scss/util/_color.scss +139 -0
- data/vendor/assets/scss/util/_direction.scss +31 -0
- data/vendor/assets/scss/util/_flex.scss +90 -0
- data/vendor/assets/scss/util/_math.scss +147 -0
- data/vendor/assets/scss/util/_mixins.scss +373 -0
- data/vendor/assets/scss/util/_selector.scss +41 -0
- data/vendor/assets/scss/util/_typography.scss +26 -0
- data/vendor/assets/scss/util/_unit.scss +152 -0
- data/vendor/assets/scss/util/_util.scss +14 -0
- data/vendor/assets/scss/util/_value.scss +200 -0
- data/vendor/assets/scss/vendor/normalize.scss +281 -0
- data/vendor/assets/scss/xy-grid/_cell.scss +272 -0
- data/vendor/assets/scss/xy-grid/_classes.scss +493 -0
- data/vendor/assets/scss/xy-grid/_collapse.scss +75 -0
- data/vendor/assets/scss/xy-grid/_frame.scss +86 -0
- data/vendor/assets/scss/xy-grid/_grid.scss +37 -0
- data/vendor/assets/scss/xy-grid/_gutters.scss +45 -0
- data/vendor/assets/scss/xy-grid/_layout.scss +36 -0
- data/vendor/assets/scss/xy-grid/_position.scss +55 -0
- data/vendor/assets/scss/xy-grid/_xy-grid.scss +51 -0
- metadata +342 -83
- data/update-gem.sh +0 -20
- data/vendor/assets/javascripts/foundation/foundation.abide.js +0 -426
- data/vendor/assets/javascripts/foundation/foundation.accordion.js +0 -125
- data/vendor/assets/javascripts/foundation/foundation.alert.js +0 -43
- data/vendor/assets/javascripts/foundation/foundation.clearing.js +0 -586
- data/vendor/assets/javascripts/foundation/foundation.dropdown.js +0 -468
- data/vendor/assets/javascripts/foundation/foundation.equalizer.js +0 -104
- data/vendor/assets/javascripts/foundation/foundation.interchange.js +0 -360
- data/vendor/assets/javascripts/foundation/foundation.joyride.js +0 -935
- data/vendor/assets/javascripts/foundation/foundation.js +0 -732
- data/vendor/assets/javascripts/foundation/foundation.magellan.js +0 -214
- data/vendor/assets/javascripts/foundation/foundation.offcanvas.js +0 -225
- data/vendor/assets/javascripts/foundation/foundation.orbit.js +0 -476
- data/vendor/assets/javascripts/foundation/foundation.reveal.js +0 -522
- data/vendor/assets/javascripts/foundation/foundation.slider.js +0 -296
- data/vendor/assets/javascripts/foundation/foundation.tab.js +0 -247
- data/vendor/assets/javascripts/foundation/foundation.tooltip.js +0 -348
- data/vendor/assets/javascripts/foundation/foundation.topbar.js +0 -458
- data/vendor/assets/javascripts/foundation.js +0 -17
- data/vendor/assets/javascripts/vendor/modernizr.js +0 -1406
- data/vendor/assets/stylesheets/foundation/_functions.scss +0 -156
- data/vendor/assets/stylesheets/foundation/_settings.scss +0 -1489
- data/vendor/assets/stylesheets/foundation/components/_accordion.scss +0 -161
- data/vendor/assets/stylesheets/foundation/components/_alert-boxes.scss +0 -128
- data/vendor/assets/stylesheets/foundation/components/_block-grid.scss +0 -133
- data/vendor/assets/stylesheets/foundation/components/_breadcrumbs.scss +0 -132
- data/vendor/assets/stylesheets/foundation/components/_button-groups.scss +0 -208
- data/vendor/assets/stylesheets/foundation/components/_buttons.scss +0 -261
- data/vendor/assets/stylesheets/foundation/components/_clearing.scss +0 -260
- data/vendor/assets/stylesheets/foundation/components/_dropdown-buttons.scss +0 -130
- data/vendor/assets/stylesheets/foundation/components/_dropdown.scss +0 -269
- data/vendor/assets/stylesheets/foundation/components/_flex-video.scss +0 -51
- data/vendor/assets/stylesheets/foundation/components/_forms.scss +0 -607
- data/vendor/assets/stylesheets/foundation/components/_global.scss +0 -566
- data/vendor/assets/stylesheets/foundation/components/_grid.scss +0 -292
- data/vendor/assets/stylesheets/foundation/components/_icon-bar.scss +0 -460
- data/vendor/assets/stylesheets/foundation/components/_inline-lists.scss +0 -58
- data/vendor/assets/stylesheets/foundation/components/_joyride.scss +0 -220
- data/vendor/assets/stylesheets/foundation/components/_keystrokes.scss +0 -60
- data/vendor/assets/stylesheets/foundation/components/_labels.scss +0 -106
- data/vendor/assets/stylesheets/foundation/components/_magellan.scss +0 -34
- data/vendor/assets/stylesheets/foundation/components/_offcanvas.scss +0 -606
- data/vendor/assets/stylesheets/foundation/components/_orbit.scss +0 -388
- data/vendor/assets/stylesheets/foundation/components/_pagination.scss +0 -163
- data/vendor/assets/stylesheets/foundation/components/_panels.scss +0 -107
- data/vendor/assets/stylesheets/foundation/components/_pricing-tables.scss +0 -150
- data/vendor/assets/stylesheets/foundation/components/_progress-bars.scss +0 -85
- data/vendor/assets/stylesheets/foundation/components/_range-slider.scss +0 -177
- data/vendor/assets/stylesheets/foundation/components/_reveal.scss +0 -212
- data/vendor/assets/stylesheets/foundation/components/_side-nav.scss +0 -120
- data/vendor/assets/stylesheets/foundation/components/_split-buttons.scss +0 -203
- data/vendor/assets/stylesheets/foundation/components/_sub-nav.scss +0 -125
- data/vendor/assets/stylesheets/foundation/components/_switches.scss +0 -241
- data/vendor/assets/stylesheets/foundation/components/_tables.scss +0 -135
- data/vendor/assets/stylesheets/foundation/components/_tabs.scss +0 -142
- data/vendor/assets/stylesheets/foundation/components/_thumbs.scss +0 -66
- data/vendor/assets/stylesheets/foundation/components/_tooltips.scss +0 -142
- data/vendor/assets/stylesheets/foundation/components/_top-bar.scss +0 -745
- data/vendor/assets/stylesheets/foundation/components/_type.scss +0 -525
- data/vendor/assets/stylesheets/foundation/components/_visibility.scss +0 -425
- data/vendor/assets/stylesheets/foundation.scss +0 -42
- data/vendor/assets/stylesheets/normalize.scss +0 -424
@@ -0,0 +1,365 @@
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
+
module.exports = factory(require("./foundation.core"), require("jquery"));
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
5
|
+
define(["./foundation.core", "jquery"], factory);
|
6
|
+
else if(typeof exports === 'object')
|
7
|
+
exports["foundation.util.touch"] = factory(require("./foundation.core"), require("jquery"));
|
8
|
+
else
|
9
|
+
root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.util.touch"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["jQuery"]);
|
10
|
+
})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {
|
11
|
+
return /******/ (function(modules) { // webpackBootstrap
|
12
|
+
/******/ // The module cache
|
13
|
+
/******/ var installedModules = {};
|
14
|
+
/******/
|
15
|
+
/******/ // The require function
|
16
|
+
/******/ function __webpack_require__(moduleId) {
|
17
|
+
/******/
|
18
|
+
/******/ // Check if module is in cache
|
19
|
+
/******/ if(installedModules[moduleId]) {
|
20
|
+
/******/ return installedModules[moduleId].exports;
|
21
|
+
/******/ }
|
22
|
+
/******/ // Create a new module (and put it into the cache)
|
23
|
+
/******/ var module = installedModules[moduleId] = {
|
24
|
+
/******/ i: moduleId,
|
25
|
+
/******/ l: false,
|
26
|
+
/******/ exports: {}
|
27
|
+
/******/ };
|
28
|
+
/******/
|
29
|
+
/******/ // Execute the module function
|
30
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
31
|
+
/******/
|
32
|
+
/******/ // Flag the module as loaded
|
33
|
+
/******/ module.l = true;
|
34
|
+
/******/
|
35
|
+
/******/ // Return the exports of the module
|
36
|
+
/******/ return module.exports;
|
37
|
+
/******/ }
|
38
|
+
/******/
|
39
|
+
/******/
|
40
|
+
/******/ // expose the modules object (__webpack_modules__)
|
41
|
+
/******/ __webpack_require__.m = modules;
|
42
|
+
/******/
|
43
|
+
/******/ // expose the module cache
|
44
|
+
/******/ __webpack_require__.c = installedModules;
|
45
|
+
/******/
|
46
|
+
/******/ // define getter function for harmony exports
|
47
|
+
/******/ __webpack_require__.d = function(exports, name, getter) {
|
48
|
+
/******/ if(!__webpack_require__.o(exports, name)) {
|
49
|
+
/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
|
50
|
+
/******/ }
|
51
|
+
/******/ };
|
52
|
+
/******/
|
53
|
+
/******/ // define __esModule on exports
|
54
|
+
/******/ __webpack_require__.r = function(exports) {
|
55
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
56
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
57
|
+
/******/ }
|
58
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
59
|
+
/******/ };
|
60
|
+
/******/
|
61
|
+
/******/ // create a fake namespace object
|
62
|
+
/******/ // mode & 1: value is a module id, require it
|
63
|
+
/******/ // mode & 2: merge all properties of value into the ns
|
64
|
+
/******/ // mode & 4: return value when already ns object
|
65
|
+
/******/ // mode & 8|1: behave like require
|
66
|
+
/******/ __webpack_require__.t = function(value, mode) {
|
67
|
+
/******/ if(mode & 1) value = __webpack_require__(value);
|
68
|
+
/******/ if(mode & 8) return value;
|
69
|
+
/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
|
70
|
+
/******/ var ns = Object.create(null);
|
71
|
+
/******/ __webpack_require__.r(ns);
|
72
|
+
/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
|
73
|
+
/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
|
74
|
+
/******/ return ns;
|
75
|
+
/******/ };
|
76
|
+
/******/
|
77
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
78
|
+
/******/ __webpack_require__.n = function(module) {
|
79
|
+
/******/ var getter = module && module.__esModule ?
|
80
|
+
/******/ function getDefault() { return module['default']; } :
|
81
|
+
/******/ function getModuleExports() { return module; };
|
82
|
+
/******/ __webpack_require__.d(getter, 'a', getter);
|
83
|
+
/******/ return getter;
|
84
|
+
/******/ };
|
85
|
+
/******/
|
86
|
+
/******/ // Object.prototype.hasOwnProperty.call
|
87
|
+
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
|
88
|
+
/******/
|
89
|
+
/******/ // __webpack_public_path__
|
90
|
+
/******/ __webpack_require__.p = "";
|
91
|
+
/******/
|
92
|
+
/******/
|
93
|
+
/******/ // Load entry module and return exports
|
94
|
+
/******/ return __webpack_require__(__webpack_require__.s = 28);
|
95
|
+
/******/ })
|
96
|
+
/************************************************************************/
|
97
|
+
/******/ ({
|
98
|
+
|
99
|
+
/***/ "./foundation.core":
|
100
|
+
/*!****************************************************************************************************************************************************************!*\
|
101
|
+
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***!
|
102
|
+
\****************************************************************************************************************************************************************/
|
103
|
+
/*! no static exports found */
|
104
|
+
/***/ (function(module, exports) {
|
105
|
+
|
106
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
|
107
|
+
|
108
|
+
/***/ }),
|
109
|
+
|
110
|
+
/***/ "./js/entries/plugins/foundation.util.touch.js":
|
111
|
+
/*!*****************************************************!*\
|
112
|
+
!*** ./js/entries/plugins/foundation.util.touch.js ***!
|
113
|
+
\*****************************************************/
|
114
|
+
/*! exports provided: Foundation, Touch */
|
115
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
116
|
+
|
117
|
+
"use strict";
|
118
|
+
__webpack_require__.r(__webpack_exports__);
|
119
|
+
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
120
|
+
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
121
|
+
/* harmony import */ var _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.util.touch */ "./js/foundation.util.touch.js");
|
122
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Touch", function() { return _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__["Touch"]; });
|
123
|
+
|
124
|
+
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core");
|
125
|
+
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_2__);
|
126
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_2__["Foundation"]; });
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
_foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__["Touch"].init(jquery__WEBPACK_IMPORTED_MODULE_0___default.a);
|
131
|
+
window.Foundation.Touch = _foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__["Touch"];
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
/***/ }),
|
136
|
+
|
137
|
+
/***/ "./js/foundation.util.touch.js":
|
138
|
+
/*!*************************************!*\
|
139
|
+
!*** ./js/foundation.util.touch.js ***!
|
140
|
+
\*************************************/
|
141
|
+
/*! exports provided: Touch */
|
142
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
143
|
+
|
144
|
+
"use strict";
|
145
|
+
__webpack_require__.r(__webpack_exports__);
|
146
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Touch", function() { return Touch; });
|
147
|
+
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
148
|
+
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
149
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
150
|
+
|
151
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
152
|
+
|
153
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
154
|
+
|
155
|
+
//**************************************************
|
156
|
+
//**Work inspired by multiple jquery swipe plugins**
|
157
|
+
//**Done by Yohai Ararat ***************************
|
158
|
+
//**************************************************
|
159
|
+
|
160
|
+
var Touch = {};
|
161
|
+
var startPosX,
|
162
|
+
startPosY,
|
163
|
+
startTime,
|
164
|
+
elapsedTime,
|
165
|
+
startEvent,
|
166
|
+
isMoving = false,
|
167
|
+
didMoved = false;
|
168
|
+
|
169
|
+
function onTouchEnd(e) {
|
170
|
+
this.removeEventListener('touchmove', onTouchMove);
|
171
|
+
this.removeEventListener('touchend', onTouchEnd); // If the touch did not move, consider it as a "tap"
|
172
|
+
|
173
|
+
if (!didMoved) {
|
174
|
+
var tapEvent = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.Event('tap', startEvent || e);
|
175
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger(tapEvent);
|
176
|
+
}
|
177
|
+
|
178
|
+
startEvent = null;
|
179
|
+
isMoving = false;
|
180
|
+
didMoved = false;
|
181
|
+
}
|
182
|
+
|
183
|
+
function onTouchMove(e) {
|
184
|
+
if (jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe.preventDefault) {
|
185
|
+
e.preventDefault();
|
186
|
+
}
|
187
|
+
|
188
|
+
if (isMoving) {
|
189
|
+
var x = e.touches[0].pageX;
|
190
|
+
var y = e.touches[0].pageY;
|
191
|
+
var dx = startPosX - x;
|
192
|
+
var dy = startPosY - y;
|
193
|
+
var dir;
|
194
|
+
didMoved = true;
|
195
|
+
elapsedTime = new Date().getTime() - startTime;
|
196
|
+
|
197
|
+
if (Math.abs(dx) >= jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe.moveThreshold && elapsedTime <= jquery__WEBPACK_IMPORTED_MODULE_0___default.a.spotSwipe.timeThreshold) {
|
198
|
+
dir = dx > 0 ? 'left' : 'right';
|
199
|
+
} // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {
|
200
|
+
// dir = dy > 0 ? 'down' : 'up';
|
201
|
+
// }
|
202
|
+
|
203
|
+
|
204
|
+
if (dir) {
|
205
|
+
e.preventDefault();
|
206
|
+
onTouchEnd.apply(this, arguments);
|
207
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).trigger(jquery__WEBPACK_IMPORTED_MODULE_0___default.a.Event('swipe', Object.assign({}, e)), dir).trigger(jquery__WEBPACK_IMPORTED_MODULE_0___default.a.Event("swipe".concat(dir), Object.assign({}, e)));
|
208
|
+
}
|
209
|
+
}
|
210
|
+
}
|
211
|
+
|
212
|
+
function onTouchStart(e) {
|
213
|
+
if (e.touches.length == 1) {
|
214
|
+
startPosX = e.touches[0].pageX;
|
215
|
+
startPosY = e.touches[0].pageY;
|
216
|
+
startEvent = e;
|
217
|
+
isMoving = true;
|
218
|
+
didMoved = false;
|
219
|
+
startTime = new Date().getTime();
|
220
|
+
this.addEventListener('touchmove', onTouchMove, false);
|
221
|
+
this.addEventListener('touchend', onTouchEnd, false);
|
222
|
+
}
|
223
|
+
}
|
224
|
+
|
225
|
+
function init() {
|
226
|
+
this.addEventListener && this.addEventListener('touchstart', onTouchStart, false);
|
227
|
+
}
|
228
|
+
|
229
|
+
function teardown() {
|
230
|
+
this.removeEventListener('touchstart', onTouchStart);
|
231
|
+
}
|
232
|
+
|
233
|
+
var SpotSwipe =
|
234
|
+
/*#__PURE__*/
|
235
|
+
function () {
|
236
|
+
function SpotSwipe($) {
|
237
|
+
_classCallCheck(this, SpotSwipe);
|
238
|
+
|
239
|
+
this.version = '1.0.0';
|
240
|
+
this.enabled = 'ontouchstart' in document.documentElement;
|
241
|
+
this.preventDefault = false;
|
242
|
+
this.moveThreshold = 75;
|
243
|
+
this.timeThreshold = 200;
|
244
|
+
this.$ = $;
|
245
|
+
|
246
|
+
this._init();
|
247
|
+
}
|
248
|
+
|
249
|
+
_createClass(SpotSwipe, [{
|
250
|
+
key: "_init",
|
251
|
+
value: function _init() {
|
252
|
+
var $ = this.$;
|
253
|
+
$.event.special.swipe = {
|
254
|
+
setup: init
|
255
|
+
};
|
256
|
+
$.event.special.tap = {
|
257
|
+
setup: init
|
258
|
+
};
|
259
|
+
$.each(['left', 'up', 'down', 'right'], function () {
|
260
|
+
$.event.special["swipe".concat(this)] = {
|
261
|
+
setup: function setup() {
|
262
|
+
$(this).on('swipe', $.noop);
|
263
|
+
}
|
264
|
+
};
|
265
|
+
});
|
266
|
+
}
|
267
|
+
}]);
|
268
|
+
|
269
|
+
return SpotSwipe;
|
270
|
+
}();
|
271
|
+
/****************************************************
|
272
|
+
* As far as I can tell, both setupSpotSwipe and *
|
273
|
+
* setupTouchHandler should be idempotent, *
|
274
|
+
* because they directly replace functions & *
|
275
|
+
* values, and do not add event handlers directly. *
|
276
|
+
****************************************************/
|
277
|
+
|
278
|
+
|
279
|
+
Touch.setupSpotSwipe = function ($) {
|
280
|
+
$.spotSwipe = new SpotSwipe($);
|
281
|
+
};
|
282
|
+
/****************************************************
|
283
|
+
* Method for adding pseudo drag events to elements *
|
284
|
+
***************************************************/
|
285
|
+
|
286
|
+
|
287
|
+
Touch.setupTouchHandler = function ($) {
|
288
|
+
$.fn.addTouch = function () {
|
289
|
+
this.each(function (i, el) {
|
290
|
+
$(el).bind('touchstart touchmove touchend touchcancel', function (event) {
|
291
|
+
//we pass the original event object because the jQuery event
|
292
|
+
//object is normalized to w3c specs and does not provide the TouchList
|
293
|
+
handleTouch(event);
|
294
|
+
});
|
295
|
+
});
|
296
|
+
|
297
|
+
var handleTouch = function handleTouch(event) {
|
298
|
+
var touches = event.changedTouches,
|
299
|
+
first = touches[0],
|
300
|
+
eventTypes = {
|
301
|
+
touchstart: 'mousedown',
|
302
|
+
touchmove: 'mousemove',
|
303
|
+
touchend: 'mouseup'
|
304
|
+
},
|
305
|
+
type = eventTypes[event.type],
|
306
|
+
simulatedEvent;
|
307
|
+
|
308
|
+
if ('MouseEvent' in window && typeof window.MouseEvent === 'function') {
|
309
|
+
simulatedEvent = new window.MouseEvent(type, {
|
310
|
+
'bubbles': true,
|
311
|
+
'cancelable': true,
|
312
|
+
'screenX': first.screenX,
|
313
|
+
'screenY': first.screenY,
|
314
|
+
'clientX': first.clientX,
|
315
|
+
'clientY': first.clientY
|
316
|
+
});
|
317
|
+
} else {
|
318
|
+
simulatedEvent = document.createEvent('MouseEvent');
|
319
|
+
simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0
|
320
|
+
/*left*/
|
321
|
+
, null);
|
322
|
+
}
|
323
|
+
|
324
|
+
first.target.dispatchEvent(simulatedEvent);
|
325
|
+
};
|
326
|
+
};
|
327
|
+
};
|
328
|
+
|
329
|
+
Touch.init = function ($) {
|
330
|
+
if (typeof $.spotSwipe === 'undefined') {
|
331
|
+
Touch.setupSpotSwipe($);
|
332
|
+
Touch.setupTouchHandler($);
|
333
|
+
}
|
334
|
+
};
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
/***/ }),
|
339
|
+
|
340
|
+
/***/ 28:
|
341
|
+
/*!***********************************************************!*\
|
342
|
+
!*** multi ./js/entries/plugins/foundation.util.touch.js ***!
|
343
|
+
\***********************************************************/
|
344
|
+
/*! no static exports found */
|
345
|
+
/***/ (function(module, exports, __webpack_require__) {
|
346
|
+
|
347
|
+
module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.util.touch.js */"./js/entries/plugins/foundation.util.touch.js");
|
348
|
+
|
349
|
+
|
350
|
+
/***/ }),
|
351
|
+
|
352
|
+
/***/ "jquery":
|
353
|
+
/*!********************************************************************************************!*\
|
354
|
+
!*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***!
|
355
|
+
\********************************************************************************************/
|
356
|
+
/*! no static exports found */
|
357
|
+
/***/ (function(module, exports) {
|
358
|
+
|
359
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
|
360
|
+
|
361
|
+
/***/ })
|
362
|
+
|
363
|
+
/******/ });
|
364
|
+
});
|
365
|
+
//# sourceMappingURL=foundation.util.touch.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/universalModuleDefinition","webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/bootstrap","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/entries/plugins/foundation.util.touch.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.util.touch.js","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}"],"names":["Touch","init","$","window","Foundation","startPosX","startPosY","startTime","elapsedTime","startEvent","isMoving","didMoved","onTouchEnd","e","removeEventListener","onTouchMove","tapEvent","Event","trigger","spotSwipe","preventDefault","x","touches","pageX","y","pageY","dx","dy","dir","Date","getTime","Math","abs","moveThreshold","timeThreshold","apply","arguments","Object","assign","onTouchStart","length","addEventListener","teardown","SpotSwipe","version","enabled","document","documentElement","_init","event","special","swipe","setup","tap","each","on","noop","setupSpotSwipe","setupTouchHandler","fn","addTouch","i","el","bind","handleTouch","changedTouches","first","eventTypes","touchstart","touchmove","touchend","type","simulatedEvent","MouseEvent","screenX","screenY","clientX","clientY","createEvent","initMouseEvent","target","dispatchEvent"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,yEAAyE;AACzE,CAAC;AACD,O;ACVA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA,kDAA0C,gCAAgC;AAC1E;AACA;;AAEA;AACA;AACA;AACA,gEAAwD,kBAAkB;AAC1E;AACA,yDAAiD,cAAc;AAC/D;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iDAAyC,iC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ACU,OAL0B;AAM3C,qBAAWV,KAAK,CAACW;AAN0B,SAA5B,CAAjB;AAQD,OATD,MASO;AACLL,sBAAc,GAAG1B,QAAQ,CAACgC,WAAT,CAAqB,YAArB,CAAjB;AACAN,sBAAc,CAACO,cAAf,CAA8BR,IAA9B,EAAoC,IAApC,EAA0C,IAA1C,EAAgDpE,MAAhD,EAAwD,CAAxD,EAA2D+D,KAAK,CAACQ,OAAjE,EAA0ER,KAAK,CAACS,OAAhF,EAAyFT,KAAK,CAACU,OAA/F,EAAwGV,KAAK,CAACW,OAA9G,EAAuH,KAAvH,EAA8H,KAA9H,EAAqI,KAArI,EAA4I,KAA5I,EAAmJ;AAAC;AAApJ,UAA8J,IAA9J;AACD;;AACDX,WAAK,CAACc,MAAN,CAAaC,aAAb,CAA2BT,cAA3B;AACD,KA1BD;AA2BD,GApCD;AAqCD,CAtCD;;AAwCAxE,KAAK,CAACC,IAAN,GAAa,UAAUC,CAAV,EAAa;AAExB,MAAG,OAAOA,CAAC,CAACiB,SAAT,KAAwB,WAA3B,EAAwC;AACtCnB,SAAK,CAACyD,cAAN,CAAqBvD,CAArB;AACAF,SAAK,CAAC0D,iBAAN,CAAwBxD,CAAxB;AACD;AACF,CAND;;;;;;;;;;;;;;;;;;;;;;;;;AChKA,oD","file":"foundation.util.touch.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.util.touch\"] = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.touch\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"jQuery\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 28);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","import $ from 'jquery';\n\nimport { Touch } from '../../foundation.util.touch';\n\nTouch.init($);\n\nwindow.Foundation.Touch = Touch;\n\nexport { Foundation } from './foundation.core';\nexport { Touch };\n","//**************************************************\n//**Work inspired by multiple jquery swipe plugins**\n//**Done by Yohai Ararat ***************************\n//**************************************************\n\nimport $ from 'jquery';\n\nvar Touch = {};\n\nvar startPosX,\n startPosY,\n startTime,\n elapsedTime,\n startEvent,\n isMoving = false,\n didMoved = false;\n\nfunction onTouchEnd(e) {\n this.removeEventListener('touchmove', onTouchMove);\n this.removeEventListener('touchend', onTouchEnd);\n\n // If the touch did not move, consider it as a \"tap\"\n if (!didMoved) {\n var tapEvent = $.Event('tap', startEvent || e);\n $(this).trigger(tapEvent);\n }\n\n startEvent = null;\n isMoving = false;\n didMoved = false;\n}\n\nfunction onTouchMove(e) {\n if ($.spotSwipe.preventDefault) { e.preventDefault(); }\n\n if(isMoving) {\n var x = e.touches[0].pageX;\n var y = e.touches[0].pageY;\n var dx = startPosX - x;\n var dy = startPosY - y;\n var dir;\n didMoved = true;\n elapsedTime = new Date().getTime() - startTime;\n if(Math.abs(dx) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n dir = dx > 0 ? 'left' : 'right';\n }\n // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n // dir = dy > 0 ? 'down' : 'up';\n // }\n if(dir) {\n e.preventDefault();\n onTouchEnd.apply(this, arguments);\n $(this)\n .trigger($.Event('swipe', Object.assign({}, e)), dir)\n .trigger($.Event(`swipe${dir}`, Object.assign({}, e)));\n }\n }\n\n}\n\nfunction onTouchStart(e) {\n\n if (e.touches.length == 1) {\n startPosX = e.touches[0].pageX;\n startPosY = e.touches[0].pageY;\n startEvent = e;\n isMoving = true;\n didMoved = false;\n startTime = new Date().getTime();\n this.addEventListener('touchmove', onTouchMove, false);\n this.addEventListener('touchend', onTouchEnd, false);\n }\n}\n\nfunction init() {\n this.addEventListener && this.addEventListener('touchstart', onTouchStart, false);\n}\n\nfunction teardown() {\n this.removeEventListener('touchstart', onTouchStart);\n}\n\nclass SpotSwipe {\n constructor($) {\n this.version = '1.0.0';\n this.enabled = 'ontouchstart' in document.documentElement;\n this.preventDefault = false;\n this.moveThreshold = 75;\n this.timeThreshold = 200;\n this.$ = $;\n this._init();\n }\n\n _init() {\n var $ = this.$;\n $.event.special.swipe = { setup: init };\n $.event.special.tap = { setup: init };\n\n $.each(['left', 'up', 'down', 'right'], function () {\n $.event.special[`swipe${this}`] = { setup: function(){\n $(this).on('swipe', $.noop);\n } };\n });\n }\n}\n\n/****************************************************\n * As far as I can tell, both setupSpotSwipe and *\n * setupTouchHandler should be idempotent, *\n * because they directly replace functions & *\n * values, and do not add event handlers directly. *\n ****************************************************/\n\nTouch.setupSpotSwipe = function($) {\n $.spotSwipe = new SpotSwipe($);\n};\n\n/****************************************************\n * Method for adding pseudo drag events to elements *\n ***************************************************/\nTouch.setupTouchHandler = function($) {\n $.fn.addTouch = function(){\n this.each(function(i,el){\n $(el).bind('touchstart touchmove touchend touchcancel', function(event) {\n //we pass the original event object because the jQuery event\n //object is normalized to w3c specs and does not provide the TouchList\n handleTouch(event);\n });\n });\n\n var handleTouch = function(event){\n var touches = event.changedTouches,\n first = touches[0],\n eventTypes = {\n touchstart: 'mousedown',\n touchmove: 'mousemove',\n touchend: 'mouseup'\n },\n type = eventTypes[event.type],\n simulatedEvent\n ;\n\n if('MouseEvent' in window && typeof window.MouseEvent === 'function') {\n simulatedEvent = new window.MouseEvent(type, {\n 'bubbles': true,\n 'cancelable': true,\n 'screenX': first.screenX,\n 'screenY': first.screenY,\n 'clientX': first.clientX,\n 'clientY': first.clientY\n });\n } else {\n simulatedEvent = document.createEvent('MouseEvent');\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);\n }\n first.target.dispatchEvent(simulatedEvent);\n };\n };\n};\n\nTouch.init = function ($) {\n\n if(typeof($.spotSwipe) === 'undefined') {\n Touch.setupSpotSwipe($);\n Touch.setupTouchHandler($);\n }\n};\n\nexport {Touch};\n","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;"],"sourceRoot":""}
|
@@ -0,0 +1,2 @@
|
|
1
|
+
!function(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.util.touch"]=t(require("./foundation.core"),require("jquery")):(e.__FOUNDATION_EXTERNAL__=e.__FOUNDATION_EXTERNAL__||{},e.__FOUNDATION_EXTERNAL__["foundation.util.touch"]=t(e.__FOUNDATION_EXTERNAL__["foundation.core"],e.jQuery))}(window,function(n,o){return r={},i.m=u={"./foundation.core":function(e,t){e.exports=n},"./js/entries/plugins/foundation.util.touch.js":function(e,t,n){"use strict";n.r(t);var o=n("jquery"),i=n.n(o),u=n("./js/foundation.util.touch.js");n.d(t,"Touch",function(){return u.Touch});var r=n("./foundation.core");n.d(t,"Foundation",function(){return r.Foundation}),u.Touch.init(i.a),window.Foundation.Touch=u.Touch},"./js/foundation.util.touch.js":function(e,t,n){"use strict";n.r(t),n.d(t,"Touch",function(){return f});var o=n("jquery"),i=n.n(o);function u(e,t){for(var n=0;n<t.length;n++){var o=t[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}var r,c,s,a,f={},p=!1,d=!1;function l(e){if(this.removeEventListener("touchmove",h),this.removeEventListener("touchend",l),!d){var t=i.a.Event("tap",a||e);i()(this).trigger(t)}a=null,d=p=!1}function h(e){if(i.a.spotSwipe.preventDefault&&e.preventDefault(),p){var t,n=e.touches[0].pageX,o=(e.touches[0].pageY,r-n);d=!0,s=(new Date).getTime()-c,Math.abs(o)>=i.a.spotSwipe.moveThreshold&&s<=i.a.spotSwipe.timeThreshold&&(t=0<o?"left":"right"),t&&(e.preventDefault(),l.apply(this,arguments),i()(this).trigger(i.a.Event("swipe",Object.assign({},e)),t).trigger(i.a.Event("swipe".concat(t),Object.assign({},e))))}}function v(e){1==e.touches.length&&(r=e.touches[0].pageX,e.touches[0].pageY,a=e,d=!(p=!0),c=(new Date).getTime(),this.addEventListener("touchmove",h,!1),this.addEventListener("touchend",l,!1))}function w(){this.addEventListener&&this.addEventListener("touchstart",v,!1)}var m=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.version="1.0.0",this.enabled="ontouchstart"in document.documentElement,this.preventDefault=!1,this.moveThreshold=75,this.timeThreshold=200,this.$=e,this._init()}return function(e,t,n){t&&u(e.prototype,t),n&&u(e,n)}(t,[{key:"_init",value:function(){var e=this.$;e.event.special.swipe={setup:w},e.event.special.tap={setup:w},e.each(["left","up","down","right"],function(){e.event.special["swipe".concat(this)]={setup:function(){e(this).on("swipe",e.noop)}}})}}]),t}();f.setupSpotSwipe=function(e){e.spotSwipe=new m(e)},f.setupTouchHandler=function(o){o.fn.addTouch=function(){this.each(function(e,t){o(t).bind("touchstart touchmove touchend touchcancel",function(e){n(e)})});var n=function(e){var t,n=e.changedTouches[0],o={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup"}[e.type];"MouseEvent"in window&&"function"==typeof window.MouseEvent?t=new window.MouseEvent(o,{bubbles:!0,cancelable:!0,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY}):(t=document.createEvent("MouseEvent")).initMouseEvent(o,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),n.target.dispatchEvent(t)}}},f.init=function(e){void 0===e.spotSwipe&&(f.setupSpotSwipe(e),f.setupTouchHandler(e))}},28:function(e,t,n){e.exports=n("./js/entries/plugins/foundation.util.touch.js")},jquery:function(e,t){e.exports=o}},i.c=r,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=28);function i(e){if(r[e])return r[e].exports;var t=r[e]={i:e,l:!1,exports:{}};return u[e].call(t.exports,t,t.exports,i),t.l=!0,t.exports}var u,r});
|
2
|
+
//# sourceMappingURL=foundation.util.touch.min.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/universalModuleDefinition","webpack://__FOUNDATION_EXTERNAL__.[name]/webpack/bootstrap","webpack:/__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.core\"],\"amd\":\"./foundation.core\",\"commonjs\":\"./foundation.core\",\"commonjs2\":\"./foundation.core\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/js/entries/plugins/foundation.util.touch.js","webpack://__FOUNDATION_EXTERNAL__.[name]/js/foundation.util.touch.js","webpack:/__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}"],"names":["root","factory","exports","module","require","define","amd","window","__WEBPACK_EXTERNAL_MODULE__foundation_core__","__WEBPACK_EXTERNAL_MODULE_jquery__","installedModules","__webpack_require__","m","r","__webpack_exports__","jquery__WEBPACK_IMPORTED_MODULE_0__","jquery__WEBPACK_IMPORTED_MODULE_0___default","n","_foundation_util_touch__WEBPACK_IMPORTED_MODULE_1__","d","_foundation_core__WEBPACK_IMPORTED_MODULE_2__","Touch","init","$","Foundation","startPosX","startTime","elapsedTime","startEvent","isMoving","didMoved","onTouchEnd","e","this","removeEventListener","onTouchMove","tapEvent","Event","trigger","spotSwipe","preventDefault","dir","x","touches","pageX","dx","pageY","Date","getTime","Math","abs","moveThreshold","timeThreshold","apply","arguments","Object","assign","concat","onTouchStart","length","addEventListener","SpotSwipe","_classCallCheck","version","enabled","document","documentElement","_init","event","special","swipe","setup","tap","each","on","noop","setupSpotSwipe","setupTouchHandler","fn","addTouch","i","el","bind","handleTouch","simulatedEvent","first","changedTouches","type","touchstart","touchmove","touchend","MouseEvent","bubbles","cancelable","screenX","screenY","clientX","clientY","createEvent","initMouseEvent","target","dispatchEvent","c","name","getter","o","defineProperty","enumerable","get","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","object","property","prototype","hasOwnProperty","call","p","s","moduleId","l","modules"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,qBAAAA,QAAA,WACA,mBAAAC,QAA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AF,EACA,GAAA,EAAAE,GAAA,iBAAAF,GAAAA,GAAAA,EAAAG,WAAA,OAAAH,EACA,IAAAI,EAAA5D,OAAA6D,OAAA,MAGA,GAFAzG,EAAAE,EAAAsG,GACA5D,OAAAmD,eAAAS,EAAA,UAAA,CAAyCR,YAAA,EAAAI,MAAAA,IACzC,EAAAE,GAAA,iBAAAF,EAAA,IAAA,IAAAM,KAAAN,EAAApG,EAAAQ,EAAAgG,EAAAE,EAAA,SAAAA,GAAgH,OAAAN,EAAAM,IAAqBnC,KAAA,KAAAmC,IACrI,OAAAF,GAIAxG,EAAAM,EAAA,SAAAd,GACA,IAAAqG,EAAArG,GAAAA,EAAA+G,WACA,WAA2B,OAAA/G,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAQ,EAAAQ,EAAAqF,EAAA,IAAAA,GACAA,GAIA7F,EAAA8F,EAAA,SAAAa,EAAAC,GAAsD,OAAAhE,OAAAiE,UAAAC,eAAAC,KAAAJ,EAAAC,IAGtD5G,EAAAgH,EAAA,GAIAhH,EAAAA,EAAAiH,EAAA,IA9EA,SAAAjH,EAAAkH,GAGA,GAAAnH,EAAAmH,GACA,OAAAnH,EAAAmH,GAAA3H,QAGA,IAAAC,EAAAO,EAAAmH,GAAA,CACA7C,EAAA6C,EACAC,GAAA,EACA5H,QAAA,IAUA,OANA6H,EAAAF,GAAAH,KAAAvH,EAAAD,QAAAC,EAAAA,EAAAD,QAAAS,GAGAR,EAAA2H,GAAA,EAGA3H,EAAAD,cAvBAQ","file":"foundation.util.touch.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.util.touch\"] = factory(require(\"./foundation.core\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.touch\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"jQuery\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE_jquery__) {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 28);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","import $ from 'jquery';\n\nimport { Touch } from '../../foundation.util.touch';\n\nTouch.init($);\n\nwindow.Foundation.Touch = Touch;\n\nexport { Foundation } from './foundation.core';\nexport { Touch };\n","//**************************************************\n//**Work inspired by multiple jquery swipe plugins**\n//**Done by Yohai Ararat ***************************\n//**************************************************\n\nimport $ from 'jquery';\n\nvar Touch = {};\n\nvar startPosX,\n startPosY,\n startTime,\n elapsedTime,\n startEvent,\n isMoving = false,\n didMoved = false;\n\nfunction onTouchEnd(e) {\n this.removeEventListener('touchmove', onTouchMove);\n this.removeEventListener('touchend', onTouchEnd);\n\n // If the touch did not move, consider it as a \"tap\"\n if (!didMoved) {\n var tapEvent = $.Event('tap', startEvent || e);\n $(this).trigger(tapEvent);\n }\n\n startEvent = null;\n isMoving = false;\n didMoved = false;\n}\n\nfunction onTouchMove(e) {\n if ($.spotSwipe.preventDefault) { e.preventDefault(); }\n\n if(isMoving) {\n var x = e.touches[0].pageX;\n var y = e.touches[0].pageY;\n var dx = startPosX - x;\n var dy = startPosY - y;\n var dir;\n didMoved = true;\n elapsedTime = new Date().getTime() - startTime;\n if(Math.abs(dx) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n dir = dx > 0 ? 'left' : 'right';\n }\n // else if(Math.abs(dy) >= $.spotSwipe.moveThreshold && elapsedTime <= $.spotSwipe.timeThreshold) {\n // dir = dy > 0 ? 'down' : 'up';\n // }\n if(dir) {\n e.preventDefault();\n onTouchEnd.apply(this, arguments);\n $(this)\n .trigger($.Event('swipe', Object.assign({}, e)), dir)\n .trigger($.Event(`swipe${dir}`, Object.assign({}, e)));\n }\n }\n\n}\n\nfunction onTouchStart(e) {\n\n if (e.touches.length == 1) {\n startPosX = e.touches[0].pageX;\n startPosY = e.touches[0].pageY;\n startEvent = e;\n isMoving = true;\n didMoved = false;\n startTime = new Date().getTime();\n this.addEventListener('touchmove', onTouchMove, false);\n this.addEventListener('touchend', onTouchEnd, false);\n }\n}\n\nfunction init() {\n this.addEventListener && this.addEventListener('touchstart', onTouchStart, false);\n}\n\nfunction teardown() {\n this.removeEventListener('touchstart', onTouchStart);\n}\n\nclass SpotSwipe {\n constructor($) {\n this.version = '1.0.0';\n this.enabled = 'ontouchstart' in document.documentElement;\n this.preventDefault = false;\n this.moveThreshold = 75;\n this.timeThreshold = 200;\n this.$ = $;\n this._init();\n }\n\n _init() {\n var $ = this.$;\n $.event.special.swipe = { setup: init };\n $.event.special.tap = { setup: init };\n\n $.each(['left', 'up', 'down', 'right'], function () {\n $.event.special[`swipe${this}`] = { setup: function(){\n $(this).on('swipe', $.noop);\n } };\n });\n }\n}\n\n/****************************************************\n * As far as I can tell, both setupSpotSwipe and *\n * setupTouchHandler should be idempotent, *\n * because they directly replace functions & *\n * values, and do not add event handlers directly. *\n ****************************************************/\n\nTouch.setupSpotSwipe = function($) {\n $.spotSwipe = new SpotSwipe($);\n};\n\n/****************************************************\n * Method for adding pseudo drag events to elements *\n ***************************************************/\nTouch.setupTouchHandler = function($) {\n $.fn.addTouch = function(){\n this.each(function(i,el){\n $(el).bind('touchstart touchmove touchend touchcancel', function(event) {\n //we pass the original event object because the jQuery event\n //object is normalized to w3c specs and does not provide the TouchList\n handleTouch(event);\n });\n });\n\n var handleTouch = function(event){\n var touches = event.changedTouches,\n first = touches[0],\n eventTypes = {\n touchstart: 'mousedown',\n touchmove: 'mousemove',\n touchend: 'mouseup'\n },\n type = eventTypes[event.type],\n simulatedEvent\n ;\n\n if('MouseEvent' in window && typeof window.MouseEvent === 'function') {\n simulatedEvent = new window.MouseEvent(type, {\n 'bubbles': true,\n 'cancelable': true,\n 'screenX': first.screenX,\n 'screenY': first.screenY,\n 'clientX': first.clientX,\n 'clientY': first.clientY\n });\n } else {\n simulatedEvent = document.createEvent('MouseEvent');\n simulatedEvent.initMouseEvent(type, true, true, window, 1, first.screenX, first.screenY, first.clientX, first.clientY, false, false, false, false, 0/*left*/, null);\n }\n first.target.dispatchEvent(simulatedEvent);\n };\n };\n};\n\nTouch.init = function ($) {\n\n if(typeof($.spotSwipe) === 'undefined') {\n Touch.setupSpotSwipe($);\n Touch.setupTouchHandler($);\n }\n};\n\nexport {Touch};\n","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;"]}
|