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,394 @@
|
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
+
module.exports = factory(require("./foundation.core"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion"), require("jquery"));
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
5
|
+
define(["./foundation.core", "./foundation.util.mediaQuery", "./foundation.util.motion", "jquery"], factory);
|
6
|
+
else if(typeof exports === 'object')
|
7
|
+
exports["foundation.responsiveToggle"] = factory(require("./foundation.core"), require("./foundation.util.mediaQuery"), require("./foundation.util.motion"), require("jquery"));
|
8
|
+
else
|
9
|
+
root["__FOUNDATION_EXTERNAL__"] = root["__FOUNDATION_EXTERNAL__"] || {}, root["__FOUNDATION_EXTERNAL__"]["foundation.responsiveToggle"] = factory(root["__FOUNDATION_EXTERNAL__"]["foundation.core"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.mediaQuery"], root["__FOUNDATION_EXTERNAL__"]["foundation.util.motion"], root["jQuery"]);
|
10
|
+
})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __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 = 13);
|
95
|
+
/******/ })
|
96
|
+
/************************************************************************/
|
97
|
+
/******/ ({
|
98
|
+
|
99
|
+
/***/ "./foundation.core":
|
100
|
+
/*!****************************************************************************************************************************************************************!*\
|
101
|
+
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.core"],"amd":"./foundation.core","commonjs":"./foundation.core","commonjs2":"./foundation.core"} ***!
|
102
|
+
\****************************************************************************************************************************************************************/
|
103
|
+
/*! no static exports found */
|
104
|
+
/***/ (function(module, exports) {
|
105
|
+
|
106
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;
|
107
|
+
|
108
|
+
/***/ }),
|
109
|
+
|
110
|
+
/***/ "./foundation.util.mediaQuery":
|
111
|
+
/*!************************************************************************************************************************************************************************************************************!*\
|
112
|
+
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.mediaQuery"],"amd":"./foundation.util.mediaQuery","commonjs":"./foundation.util.mediaQuery","commonjs2":"./foundation.util.mediaQuery"} ***!
|
113
|
+
\************************************************************************************************************************************************************************************************************/
|
114
|
+
/*! no static exports found */
|
115
|
+
/***/ (function(module, exports) {
|
116
|
+
|
117
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__;
|
118
|
+
|
119
|
+
/***/ }),
|
120
|
+
|
121
|
+
/***/ "./foundation.util.motion":
|
122
|
+
/*!********************************************************************************************************************************************************************************************!*\
|
123
|
+
!*** external {"root":["__FOUNDATION_EXTERNAL__","foundation.util.motion"],"amd":"./foundation.util.motion","commonjs":"./foundation.util.motion","commonjs2":"./foundation.util.motion"} ***!
|
124
|
+
\********************************************************************************************************************************************************************************************/
|
125
|
+
/*! no static exports found */
|
126
|
+
/***/ (function(module, exports) {
|
127
|
+
|
128
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__;
|
129
|
+
|
130
|
+
/***/ }),
|
131
|
+
|
132
|
+
/***/ "./js/entries/plugins/foundation.responsiveToggle.js":
|
133
|
+
/*!***********************************************************!*\
|
134
|
+
!*** ./js/entries/plugins/foundation.responsiveToggle.js ***!
|
135
|
+
\***********************************************************/
|
136
|
+
/*! exports provided: Foundation, ResponsiveToggle */
|
137
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
138
|
+
|
139
|
+
"use strict";
|
140
|
+
__webpack_require__.r(__webpack_exports__);
|
141
|
+
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./foundation.core */ "./foundation.core");
|
142
|
+
/* harmony import */ var _foundation_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_foundation_core__WEBPACK_IMPORTED_MODULE_0__);
|
143
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "Foundation", function() { return _foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"]; });
|
144
|
+
|
145
|
+
/* harmony import */ var _foundation_responsiveToggle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../foundation.responsiveToggle */ "./js/foundation.responsiveToggle.js");
|
146
|
+
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "ResponsiveToggle", function() { return _foundation_responsiveToggle__WEBPACK_IMPORTED_MODULE_1__["ResponsiveToggle"]; });
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
_foundation_core__WEBPACK_IMPORTED_MODULE_0__["Foundation"].plugin(_foundation_responsiveToggle__WEBPACK_IMPORTED_MODULE_1__["ResponsiveToggle"], 'ResponsiveToggle');
|
151
|
+
|
152
|
+
|
153
|
+
/***/ }),
|
154
|
+
|
155
|
+
/***/ "./js/foundation.responsiveToggle.js":
|
156
|
+
/*!*******************************************!*\
|
157
|
+
!*** ./js/foundation.responsiveToggle.js ***!
|
158
|
+
\*******************************************/
|
159
|
+
/*! exports provided: ResponsiveToggle */
|
160
|
+
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
161
|
+
|
162
|
+
"use strict";
|
163
|
+
__webpack_require__.r(__webpack_exports__);
|
164
|
+
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResponsiveToggle", function() { return ResponsiveToggle; });
|
165
|
+
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! jquery */ "jquery");
|
166
|
+
/* harmony import */ var jquery__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(jquery__WEBPACK_IMPORTED_MODULE_0__);
|
167
|
+
/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./foundation.util.mediaQuery */ "./foundation.util.mediaQuery");
|
168
|
+
/* harmony import */ var _foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__);
|
169
|
+
/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./foundation.util.motion */ "./foundation.util.motion");
|
170
|
+
/* harmony import */ var _foundation_util_motion__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__);
|
171
|
+
/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./foundation.core.plugin */ "./foundation.core");
|
172
|
+
/* harmony import */ var _foundation_core_plugin__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_3__);
|
173
|
+
|
174
|
+
|
175
|
+
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
176
|
+
|
177
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
178
|
+
|
179
|
+
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); } }
|
180
|
+
|
181
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
182
|
+
|
183
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
184
|
+
|
185
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
186
|
+
|
187
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
188
|
+
|
189
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
190
|
+
|
191
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
|
197
|
+
/**
|
198
|
+
* ResponsiveToggle module.
|
199
|
+
* @module foundation.responsiveToggle
|
200
|
+
* @requires foundation.util.mediaQuery
|
201
|
+
* @requires foundation.util.motion
|
202
|
+
*/
|
203
|
+
|
204
|
+
var ResponsiveToggle =
|
205
|
+
/*#__PURE__*/
|
206
|
+
function (_Plugin) {
|
207
|
+
_inherits(ResponsiveToggle, _Plugin);
|
208
|
+
|
209
|
+
function ResponsiveToggle() {
|
210
|
+
_classCallCheck(this, ResponsiveToggle);
|
211
|
+
|
212
|
+
return _possibleConstructorReturn(this, _getPrototypeOf(ResponsiveToggle).apply(this, arguments));
|
213
|
+
}
|
214
|
+
|
215
|
+
_createClass(ResponsiveToggle, [{
|
216
|
+
key: "_setup",
|
217
|
+
|
218
|
+
/**
|
219
|
+
* Creates a new instance of Tab Bar.
|
220
|
+
* @class
|
221
|
+
* @name ResponsiveToggle
|
222
|
+
* @fires ResponsiveToggle#init
|
223
|
+
* @param {jQuery} element - jQuery object to attach tab bar functionality to.
|
224
|
+
* @param {Object} options - Overrides to the default plugin settings.
|
225
|
+
*/
|
226
|
+
value: function _setup(element, options) {
|
227
|
+
this.$element = jquery__WEBPACK_IMPORTED_MODULE_0___default()(element);
|
228
|
+
this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, ResponsiveToggle.defaults, this.$element.data(), options);
|
229
|
+
this.className = 'ResponsiveToggle'; // ie9 back compat
|
230
|
+
|
231
|
+
this._init();
|
232
|
+
|
233
|
+
this._events();
|
234
|
+
}
|
235
|
+
/**
|
236
|
+
* Initializes the tab bar by finding the target element, toggling element, and running update().
|
237
|
+
* @function
|
238
|
+
* @private
|
239
|
+
*/
|
240
|
+
|
241
|
+
}, {
|
242
|
+
key: "_init",
|
243
|
+
value: function _init() {
|
244
|
+
_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"]._init();
|
245
|
+
|
246
|
+
var targetID = this.$element.data('responsive-toggle');
|
247
|
+
|
248
|
+
if (!targetID) {
|
249
|
+
console.error('Your tab bar needs an ID of a Menu as the value of data-tab-bar.');
|
250
|
+
}
|
251
|
+
|
252
|
+
this.$targetMenu = jquery__WEBPACK_IMPORTED_MODULE_0___default()("#".concat(targetID));
|
253
|
+
this.$toggler = this.$element.find('[data-toggle]').filter(function () {
|
254
|
+
var target = jquery__WEBPACK_IMPORTED_MODULE_0___default()(this).data('toggle');
|
255
|
+
return target === targetID || target === "";
|
256
|
+
});
|
257
|
+
this.options = jquery__WEBPACK_IMPORTED_MODULE_0___default.a.extend({}, this.options, this.$targetMenu.data()); // If they were set, parse the animation classes
|
258
|
+
|
259
|
+
if (this.options.animate) {
|
260
|
+
var input = this.options.animate.split(' ');
|
261
|
+
this.animationIn = input[0];
|
262
|
+
this.animationOut = input[1] || null;
|
263
|
+
}
|
264
|
+
|
265
|
+
this._update();
|
266
|
+
}
|
267
|
+
/**
|
268
|
+
* Adds necessary event handlers for the tab bar to work.
|
269
|
+
* @function
|
270
|
+
* @private
|
271
|
+
*/
|
272
|
+
|
273
|
+
}, {
|
274
|
+
key: "_events",
|
275
|
+
value: function _events() {
|
276
|
+
var _this = this;
|
277
|
+
|
278
|
+
this._updateMqHandler = this._update.bind(this);
|
279
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).on('changed.zf.mediaquery', this._updateMqHandler);
|
280
|
+
this.$toggler.on('click.zf.responsiveToggle', this.toggleMenu.bind(this));
|
281
|
+
}
|
282
|
+
/**
|
283
|
+
* Checks the current media query to determine if the tab bar should be visible or hidden.
|
284
|
+
* @function
|
285
|
+
* @private
|
286
|
+
*/
|
287
|
+
|
288
|
+
}, {
|
289
|
+
key: "_update",
|
290
|
+
value: function _update() {
|
291
|
+
// Mobile
|
292
|
+
if (!_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"].atLeast(this.options.hideFor)) {
|
293
|
+
this.$element.show();
|
294
|
+
this.$targetMenu.hide();
|
295
|
+
} // Desktop
|
296
|
+
else {
|
297
|
+
this.$element.hide();
|
298
|
+
this.$targetMenu.show();
|
299
|
+
}
|
300
|
+
}
|
301
|
+
/**
|
302
|
+
* Toggles the element attached to the tab bar. The toggle only happens if the screen is small enough to allow it.
|
303
|
+
* @function
|
304
|
+
* @fires ResponsiveToggle#toggled
|
305
|
+
*/
|
306
|
+
|
307
|
+
}, {
|
308
|
+
key: "toggleMenu",
|
309
|
+
value: function toggleMenu() {
|
310
|
+
var _this2 = this;
|
311
|
+
|
312
|
+
if (!_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__["MediaQuery"].atLeast(this.options.hideFor)) {
|
313
|
+
/**
|
314
|
+
* Fires when the element attached to the tab bar toggles.
|
315
|
+
* @event ResponsiveToggle#toggled
|
316
|
+
*/
|
317
|
+
if (this.options.animate) {
|
318
|
+
if (this.$targetMenu.is(':hidden')) {
|
319
|
+
_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__["Motion"].animateIn(this.$targetMenu, this.animationIn, function () {
|
320
|
+
_this2.$element.trigger('toggled.zf.responsiveToggle');
|
321
|
+
|
322
|
+
_this2.$targetMenu.find('[data-mutate]').triggerHandler('mutateme.zf.trigger');
|
323
|
+
});
|
324
|
+
} else {
|
325
|
+
_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__["Motion"].animateOut(this.$targetMenu, this.animationOut, function () {
|
326
|
+
_this2.$element.trigger('toggled.zf.responsiveToggle');
|
327
|
+
});
|
328
|
+
}
|
329
|
+
} else {
|
330
|
+
this.$targetMenu.toggle(0);
|
331
|
+
this.$targetMenu.find('[data-mutate]').trigger('mutateme.zf.trigger');
|
332
|
+
this.$element.trigger('toggled.zf.responsiveToggle');
|
333
|
+
}
|
334
|
+
}
|
335
|
+
}
|
336
|
+
}, {
|
337
|
+
key: "_destroy",
|
338
|
+
value: function _destroy() {
|
339
|
+
this.$element.off('.zf.responsiveToggle');
|
340
|
+
this.$toggler.off('.zf.responsiveToggle');
|
341
|
+
jquery__WEBPACK_IMPORTED_MODULE_0___default()(window).off('changed.zf.mediaquery', this._updateMqHandler);
|
342
|
+
}
|
343
|
+
}]);
|
344
|
+
|
345
|
+
return ResponsiveToggle;
|
346
|
+
}(_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_3__["Plugin"]);
|
347
|
+
|
348
|
+
ResponsiveToggle.defaults = {
|
349
|
+
/**
|
350
|
+
* The breakpoint after which the menu is always shown, and the tab bar is hidden.
|
351
|
+
* @option
|
352
|
+
* @type {string}
|
353
|
+
* @default 'medium'
|
354
|
+
*/
|
355
|
+
hideFor: 'medium',
|
356
|
+
|
357
|
+
/**
|
358
|
+
* To decide if the toggle should be animated or not.
|
359
|
+
* @option
|
360
|
+
* @type {boolean}
|
361
|
+
* @default false
|
362
|
+
*/
|
363
|
+
animate: false
|
364
|
+
};
|
365
|
+
|
366
|
+
|
367
|
+
/***/ }),
|
368
|
+
|
369
|
+
/***/ 13:
|
370
|
+
/*!*****************************************************************!*\
|
371
|
+
!*** multi ./js/entries/plugins/foundation.responsiveToggle.js ***!
|
372
|
+
\*****************************************************************/
|
373
|
+
/*! no static exports found */
|
374
|
+
/***/ (function(module, exports, __webpack_require__) {
|
375
|
+
|
376
|
+
module.exports = __webpack_require__(/*! /Users/joeworkman/Development/foundation-sites/js/entries/plugins/foundation.responsiveToggle.js */"./js/entries/plugins/foundation.responsiveToggle.js");
|
377
|
+
|
378
|
+
|
379
|
+
/***/ }),
|
380
|
+
|
381
|
+
/***/ "jquery":
|
382
|
+
/*!********************************************************************************************!*\
|
383
|
+
!*** external {"root":["jQuery"],"amd":"jquery","commonjs":"jquery","commonjs2":"jquery"} ***!
|
384
|
+
\********************************************************************************************/
|
385
|
+
/*! no static exports found */
|
386
|
+
/***/ (function(module, exports) {
|
387
|
+
|
388
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;
|
389
|
+
|
390
|
+
/***/ })
|
391
|
+
|
392
|
+
/******/ });
|
393
|
+
});
|
394
|
+
//# sourceMappingURL=foundation.responsiveToggle.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]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.mediaQuery\"],\"amd\":\"./foundation.util.mediaQuery\",\"commonjs\":\"./foundation.util.mediaQuery\",\"commonjs2\":\"./foundation.util.mediaQuery\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.motion\"],\"amd\":\"./foundation.util.motion\",\"commonjs\":\"./foundation.util.motion\",\"commonjs2\":\"./foundation.util.motion\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/entries/plugins/foundation.responsiveToggle.js","webpack://__FOUNDATION_EXTERNAL__.[name]/./js/foundation.responsiveToggle.js","webpack://__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"jQuery\"],\"amd\":\"jquery\",\"commonjs\":\"jquery\",\"commonjs2\":\"jquery\"}"],"names":["Foundation","plugin","ResponsiveToggle","element","options","$element","$","extend","defaults","data","className","_init","_events","MediaQuery","targetID","console","error","$targetMenu","$toggler","find","filter","target","animate","input","split","animationIn","animationOut","_update","_this","_updateMqHandler","bind","window","on","toggleMenu","atLeast","hideFor","show","hide","is","Motion","animateIn","trigger","triggerHandler","animateOut","toggle","off","Plugin"],"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;AA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E;AAfiB,CAA5B;;;;;;;;;;;;;;;;;;;;;;;;ACzIA,oD","file":"foundation.responsiveToggle.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"./foundation.util.mediaQuery\"), require(\"./foundation.util.motion\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"./foundation.util.mediaQuery\", \"./foundation.util.motion\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.responsiveToggle\"] = factory(require(\"./foundation.core\"), require(\"./foundation.util.mediaQuery\"), require(\"./foundation.util.motion\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.responsiveToggle\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.mediaQuery\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.motion\"], root[\"jQuery\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __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 = 13);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__;","import { Foundation } from './foundation.core';\n\nimport { ResponsiveToggle } from '../../foundation.responsiveToggle';\nFoundation.plugin(ResponsiveToggle, 'ResponsiveToggle');\n\nexport { Foundation, ResponsiveToggle };\n","'use strict';\n\nimport $ from 'jquery';\n\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Motion } from './foundation.util.motion';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * ResponsiveToggle module.\n * @module foundation.responsiveToggle\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.motion\n */\n\nclass ResponsiveToggle extends Plugin {\n /**\n * Creates a new instance of Tab Bar.\n * @class\n * @name ResponsiveToggle\n * @fires ResponsiveToggle#init\n * @param {jQuery} element - jQuery object to attach tab bar functionality to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = $(element);\n this.options = $.extend({}, ResponsiveToggle.defaults, this.$element.data(), options);\n this.className = 'ResponsiveToggle'; // ie9 back compat\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the tab bar by finding the target element, toggling element, and running update().\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n var targetID = this.$element.data('responsive-toggle');\n if (!targetID) {\n console.error('Your tab bar needs an ID of a Menu as the value of data-tab-bar.');\n }\n\n this.$targetMenu = $(`#${targetID}`);\n this.$toggler = this.$element.find('[data-toggle]').filter(function() {\n var target = $(this).data('toggle');\n return (target === targetID || target === \"\");\n });\n this.options = $.extend({}, this.options, this.$targetMenu.data());\n\n // If they were set, parse the animation classes\n if(this.options.animate) {\n let input = this.options.animate.split(' ');\n\n this.animationIn = input[0];\n this.animationOut = input[1] || null;\n }\n\n this._update();\n }\n\n /**\n * Adds necessary event handlers for the tab bar to work.\n * @function\n * @private\n */\n _events() {\n var _this = this;\n\n this._updateMqHandler = this._update.bind(this);\n\n $(window).on('changed.zf.mediaquery', this._updateMqHandler);\n\n this.$toggler.on('click.zf.responsiveToggle', this.toggleMenu.bind(this));\n }\n\n /**\n * Checks the current media query to determine if the tab bar should be visible or hidden.\n * @function\n * @private\n */\n _update() {\n // Mobile\n if (!MediaQuery.atLeast(this.options.hideFor)) {\n this.$element.show();\n this.$targetMenu.hide();\n }\n\n // Desktop\n else {\n this.$element.hide();\n this.$targetMenu.show();\n }\n }\n\n /**\n * Toggles the element attached to the tab bar. The toggle only happens if the screen is small enough to allow it.\n * @function\n * @fires ResponsiveToggle#toggled\n */\n toggleMenu() {\n if (!MediaQuery.atLeast(this.options.hideFor)) {\n /**\n * Fires when the element attached to the tab bar toggles.\n * @event ResponsiveToggle#toggled\n */\n if(this.options.animate) {\n if (this.$targetMenu.is(':hidden')) {\n Motion.animateIn(this.$targetMenu, this.animationIn, () => {\n this.$element.trigger('toggled.zf.responsiveToggle');\n this.$targetMenu.find('[data-mutate]').triggerHandler('mutateme.zf.trigger');\n });\n }\n else {\n Motion.animateOut(this.$targetMenu, this.animationOut, () => {\n this.$element.trigger('toggled.zf.responsiveToggle');\n });\n }\n }\n else {\n this.$targetMenu.toggle(0);\n this.$targetMenu.find('[data-mutate]').trigger('mutateme.zf.trigger');\n this.$element.trigger('toggled.zf.responsiveToggle');\n }\n }\n };\n\n _destroy() {\n this.$element.off('.zf.responsiveToggle');\n this.$toggler.off('.zf.responsiveToggle');\n\n $(window).off('changed.zf.mediaquery', this._updateMqHandler);\n }\n}\n\nResponsiveToggle.defaults = {\n /**\n * The breakpoint after which the menu is always shown, and the tab bar is hidden.\n * @option\n * @type {string}\n * @default 'medium'\n */\n hideFor: 'medium',\n\n /**\n * To decide if the toggle should be animated or not.\n * @option\n * @type {boolean}\n * @default false\n */\n animate: false\n};\n\nexport { ResponsiveToggle };\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("./foundation.util.mediaQuery"),require("./foundation.util.motion"),require("jquery")):"function"==typeof define&&define.amd?define(["./foundation.core","./foundation.util.mediaQuery","./foundation.util.motion","jquery"],t):"object"==typeof exports?exports["foundation.responsiveToggle"]=t(require("./foundation.core"),require("./foundation.util.mediaQuery"),require("./foundation.util.motion"),require("jquery")):(e.__FOUNDATION_EXTERNAL__=e.__FOUNDATION_EXTERNAL__||{},e.__FOUNDATION_EXTERNAL__["foundation.responsiveToggle"]=t(e.__FOUNDATION_EXTERNAL__["foundation.core"],e.__FOUNDATION_EXTERNAL__["foundation.util.mediaQuery"],e.__FOUNDATION_EXTERNAL__["foundation.util.motion"],e.jQuery))}(window,function(n,o,i,r){return s={},u.m=a={"./foundation.core":function(e,t){e.exports=n},"./foundation.util.mediaQuery":function(e,t){e.exports=o},"./foundation.util.motion":function(e,t){e.exports=i},"./js/entries/plugins/foundation.responsiveToggle.js":function(e,t,n){"use strict";n.r(t);var o=n("./foundation.core");n.d(t,"Foundation",function(){return o.Foundation});var i=n("./js/foundation.responsiveToggle.js");n.d(t,"ResponsiveToggle",function(){return i.ResponsiveToggle}),o.Foundation.plugin(i.ResponsiveToggle,"ResponsiveToggle")},"./js/foundation.responsiveToggle.js":function(e,t,n){"use strict";n.r(t),n.d(t,"ResponsiveToggle",function(){return g});var o=n("jquery"),i=n.n(o),r=n("./foundation.util.mediaQuery"),u=n("./foundation.util.motion"),a=n("./foundation.core");function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(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)}}function l(e,t){return!t||"object"!==s(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function d(e){return(d=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function c(e,t){return(c=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var g=function(){function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),l(this,d(n).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&c(e,t)}(n,a["Plugin"]),function(e,t,n){t&&f(e.prototype,t),n&&f(e,n)}(n,[{key:"_setup",value:function(e,t){this.$element=i()(e),this.options=i.a.extend({},n.defaults,this.$element.data(),t),this.className="ResponsiveToggle",this._init(),this._events()}},{key:"_init",value:function(){r.MediaQuery._init();var t=this.$element.data("responsive-toggle");if(t||console.error("Your tab bar needs an ID of a Menu as the value of data-tab-bar."),this.$targetMenu=i()("#".concat(t)),this.$toggler=this.$element.find("[data-toggle]").filter(function(){var e=i()(this).data("toggle");return e===t||""===e}),this.options=i.a.extend({},this.options,this.$targetMenu.data()),this.options.animate){var e=this.options.animate.split(" ");this.animationIn=e[0],this.animationOut=e[1]||null}this._update()}},{key:"_events",value:function(){this._updateMqHandler=this._update.bind(this),i()(window).on("changed.zf.mediaquery",this._updateMqHandler),this.$toggler.on("click.zf.responsiveToggle",this.toggleMenu.bind(this))}},{key:"_update",value:function(){r.MediaQuery.atLeast(this.options.hideFor)?(this.$element.hide(),this.$targetMenu.show()):(this.$element.show(),this.$targetMenu.hide())}},{key:"toggleMenu",value:function(){var e=this;r.MediaQuery.atLeast(this.options.hideFor)||(this.options.animate?this.$targetMenu.is(":hidden")?u.Motion.animateIn(this.$targetMenu,this.animationIn,function(){e.$element.trigger("toggled.zf.responsiveToggle"),e.$targetMenu.find("[data-mutate]").triggerHandler("mutateme.zf.trigger")}):u.Motion.animateOut(this.$targetMenu,this.animationOut,function(){e.$element.trigger("toggled.zf.responsiveToggle")}):(this.$targetMenu.toggle(0),this.$targetMenu.find("[data-mutate]").trigger("mutateme.zf.trigger"),this.$element.trigger("toggled.zf.responsiveToggle")))}},{key:"_destroy",value:function(){this.$element.off(".zf.responsiveToggle"),this.$toggler.off(".zf.responsiveToggle"),i()(window).off("changed.zf.mediaquery",this._updateMqHandler)}}]),n}();g.defaults={hideFor:"medium",animate:!1}},13:function(e,t,n){e.exports=n("./js/entries/plugins/foundation.responsiveToggle.js")},jquery:function(e,t){e.exports=r}},u.c=s,u.d=function(e,t,n){u.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},u.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},u.t=function(t,e){if(1&e&&(t=u(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(u.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)u.d(n,o,function(e){return t[e]}.bind(null,o));return n},u.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return u.d(t,"a",t),t},u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},u.p="",u(u.s=13);function u(e){if(s[e])return s[e].exports;var t=s[e]={i:e,l:!1,exports:{}};return a[e].call(t.exports,t,t.exports,u),t.l=!0,t.exports}var a,s});
|
2
|
+
//# sourceMappingURL=foundation.responsiveToggle.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]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.mediaQuery\"],\"amd\":\"./foundation.util.mediaQuery\",\"commonjs\":\"./foundation.util.mediaQuery\",\"commonjs2\":\"./foundation.util.mediaQuery\"}","webpack:/__FOUNDATION_EXTERNAL__.[name]/external {\"root\":[\"__FOUNDATION_EXTERNAL__\",\"foundation.util.motion\"],\"amd\":\"./foundation.util.motion\",\"commonjs\":\"./foundation.util.motion\",\"commonjs2\":\"./foundation.util.motion\"}","webpack://__FOUNDATION_EXTERNAL__.[name]/js/entries/plugins/foundation.responsiveToggle.js","webpack://__FOUNDATION_EXTERNAL__.[name]/js/foundation.responsiveToggle.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__foundation_util_mediaQuery__","__WEBPACK_EXTERNAL_MODULE__foundation_util_motion__","__WEBPACK_EXTERNAL_MODULE_jquery__","installedModules","__webpack_require__","m","r","__webpack_exports__","_foundation_core__WEBPACK_IMPORTED_MODULE_0__","d","_foundation_responsiveToggle__WEBPACK_IMPORTED_MODULE_1__","Foundation","plugin","ResponsiveToggle","jquery__WEBPACK_IMPORTED_MODULE_0__","jquery__WEBPACK_IMPORTED_MODULE_0___default","n","_foundation_util_mediaQuery__WEBPACK_IMPORTED_MODULE_1__","_foundation_util_motion__WEBPACK_IMPORTED_MODULE_2__","_foundation_core_plugin__WEBPACK_IMPORTED_MODULE_3__","Plugin","element","options","this","$element","$","extend","defaults","data","className","_init","_events","MediaQuery","targetID","console","error","$targetMenu","concat","$toggler","find","filter","target","animate","input","split","animationIn","animationOut","_update","_updateMqHandler","bind","on","toggleMenu","atLeast","hideFor","hide","show","_this2","is","Motion","animateIn","trigger","triggerHandler","animateOut","toggle","off","c","name","getter","o","Object","defineProperty","enumerable","get","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","object","property","prototype","hasOwnProperty","call","p","s","moduleId","i","l","modules"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,EAAAG,QAAA,qBAAAA,QAAA,gCAAAA,QAAA,4BAAAA,QAAA,WACA,mBAAAC,QAAAA,OAAAC,IACAD,OAAA,CAAA,oBAAA,+BAAA,2BAAA,UAAAJ,GACA,iBAAAC,QACAA,QAAA,+BAAAD,EAAAG,QAAA,qBAAAA,QAAA,gCAAAA,QAAA,4BAAAA,QAAA,YAEAJ,EAAA,wBAAAA,EAAA,yBAAA,GAAyEA,EAAA,wBAAA,+BAAAC,EAAAD,EAAA,wBAAA,mBAAAA,EAAA,wBAAA,8BAAAA,EAAA,wBAAA,0BAAAA,EAAA,SARzE,CASCO,OAAA,SAAAC,EAAAC,EAAAC,EAAAC,GACD,OCTAC,EAAA,GA4BAC,EAAAC,uCC7BAX,EAAAD,QAAAM,gDCAAL,EAAAD,QAAAO,4CCAAN,EAAAD,QAAAQ,sFCAAG,EAAAE,EAAAC,GAAA,IAAAC,EAAAJ,EAAA,qBAAAA,EAAAK,EAAAF,EAAA,aAAA,WAAA,OAAAC,EAAA,aAAA,IAAAE,EAAAN,EAAA,uCAAAA,EAAAK,EAAAF,EAAA,mBAAA,WAAA,OAAAG,EAAA,mBAGAC,EAAAA,WAAWC,OAAOC,EAAAA,iBAAkB,wFCHpCT,EAAAE,EAAAC,GAAAH,EAAAK,EAAAF,EAAA,mBAAA,WAAA,OAAAM,IAAA,IAAAC,EAAAV,EAAA,UAAAW,EAAAX,EAAAY,EAAAF,GAAAG,EAAAb,EAAA,gCAAAc,EAAAd,EAAA,4BAAAe,EAAAf,EAAA,g0BAeMS,q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OAAAN,EAAAM,IAAqBhC,KAAA,KAAAgC,IACrI,OAAAF,GAIA3E,EAAAY,EAAA,SAAAtB,GACA,IAAAyE,EAAAzE,GAAAA,EAAAoF,WACA,WAA2B,OAAApF,EAAA,SAC3B,WAAiC,OAAAA,GAEjC,OADAU,EAAAK,EAAA0D,EAAA,IAAAA,GACAA,GAIA/D,EAAAgE,EAAA,SAAAc,EAAAC,GAAsD,OAAAd,OAAAe,UAAAC,eAAAC,KAAAJ,EAAAC,IAGtD/E,EAAAmF,EAAA,GAIAnF,EAAAA,EAAAoF,EAAA,IA9EA,SAAApF,EAAAqF,GAGA,GAAAtF,EAAAsF,GACA,OAAAtF,EAAAsF,GAAAhG,QAGA,IAAAC,EAAAS,EAAAsF,GAAA,CACAC,EAAAD,EACAE,GAAA,EACAlG,QAAA,IAUA,OANAmG,EAAAH,GAAAH,KAAA5F,EAAAD,QAAAC,EAAAA,EAAAD,QAAAW,GAGAV,EAAAiG,GAAA,EAGAjG,EAAAD,cAvBAU","file":"foundation.responsiveToggle.min.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"./foundation.core\"), require(\"./foundation.util.mediaQuery\"), require(\"./foundation.util.motion\"), require(\"jquery\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"./foundation.core\", \"./foundation.util.mediaQuery\", \"./foundation.util.motion\", \"jquery\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"foundation.responsiveToggle\"] = factory(require(\"./foundation.core\"), require(\"./foundation.util.mediaQuery\"), require(\"./foundation.util.motion\"), require(\"jquery\"));\n\telse\n\t\troot[\"__FOUNDATION_EXTERNAL__\"] = root[\"__FOUNDATION_EXTERNAL__\"] || {}, root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.responsiveToggle\"] = factory(root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.core\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.mediaQuery\"], root[\"__FOUNDATION_EXTERNAL__\"][\"foundation.util.motion\"], root[\"jQuery\"]);\n})(window, function(__WEBPACK_EXTERNAL_MODULE__foundation_core__, __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__, __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__, __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 = 13);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_core__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_mediaQuery__;","module.exports = __WEBPACK_EXTERNAL_MODULE__foundation_util_motion__;","import { Foundation } from './foundation.core';\n\nimport { ResponsiveToggle } from '../../foundation.responsiveToggle';\nFoundation.plugin(ResponsiveToggle, 'ResponsiveToggle');\n\nexport { Foundation, ResponsiveToggle };\n","'use strict';\n\nimport $ from 'jquery';\n\nimport { MediaQuery } from './foundation.util.mediaQuery';\nimport { Motion } from './foundation.util.motion';\nimport { Plugin } from './foundation.core.plugin';\n\n/**\n * ResponsiveToggle module.\n * @module foundation.responsiveToggle\n * @requires foundation.util.mediaQuery\n * @requires foundation.util.motion\n */\n\nclass ResponsiveToggle extends Plugin {\n /**\n * Creates a new instance of Tab Bar.\n * @class\n * @name ResponsiveToggle\n * @fires ResponsiveToggle#init\n * @param {jQuery} element - jQuery object to attach tab bar functionality to.\n * @param {Object} options - Overrides to the default plugin settings.\n */\n _setup(element, options) {\n this.$element = $(element);\n this.options = $.extend({}, ResponsiveToggle.defaults, this.$element.data(), options);\n this.className = 'ResponsiveToggle'; // ie9 back compat\n\n this._init();\n this._events();\n }\n\n /**\n * Initializes the tab bar by finding the target element, toggling element, and running update().\n * @function\n * @private\n */\n _init() {\n MediaQuery._init();\n var targetID = this.$element.data('responsive-toggle');\n if (!targetID) {\n console.error('Your tab bar needs an ID of a Menu as the value of data-tab-bar.');\n }\n\n this.$targetMenu = $(`#${targetID}`);\n this.$toggler = this.$element.find('[data-toggle]').filter(function() {\n var target = $(this).data('toggle');\n return (target === targetID || target === \"\");\n });\n this.options = $.extend({}, this.options, this.$targetMenu.data());\n\n // If they were set, parse the animation classes\n if(this.options.animate) {\n let input = this.options.animate.split(' ');\n\n this.animationIn = input[0];\n this.animationOut = input[1] || null;\n }\n\n this._update();\n }\n\n /**\n * Adds necessary event handlers for the tab bar to work.\n * @function\n * @private\n */\n _events() {\n var _this = this;\n\n this._updateMqHandler = this._update.bind(this);\n\n $(window).on('changed.zf.mediaquery', this._updateMqHandler);\n\n this.$toggler.on('click.zf.responsiveToggle', this.toggleMenu.bind(this));\n }\n\n /**\n * Checks the current media query to determine if the tab bar should be visible or hidden.\n * @function\n * @private\n */\n _update() {\n // Mobile\n if (!MediaQuery.atLeast(this.options.hideFor)) {\n this.$element.show();\n this.$targetMenu.hide();\n }\n\n // Desktop\n else {\n this.$element.hide();\n this.$targetMenu.show();\n }\n }\n\n /**\n * Toggles the element attached to the tab bar. The toggle only happens if the screen is small enough to allow it.\n * @function\n * @fires ResponsiveToggle#toggled\n */\n toggleMenu() {\n if (!MediaQuery.atLeast(this.options.hideFor)) {\n /**\n * Fires when the element attached to the tab bar toggles.\n * @event ResponsiveToggle#toggled\n */\n if(this.options.animate) {\n if (this.$targetMenu.is(':hidden')) {\n Motion.animateIn(this.$targetMenu, this.animationIn, () => {\n this.$element.trigger('toggled.zf.responsiveToggle');\n this.$targetMenu.find('[data-mutate]').triggerHandler('mutateme.zf.trigger');\n });\n }\n else {\n Motion.animateOut(this.$targetMenu, this.animationOut, () => {\n this.$element.trigger('toggled.zf.responsiveToggle');\n });\n }\n }\n else {\n this.$targetMenu.toggle(0);\n this.$targetMenu.find('[data-mutate]').trigger('mutateme.zf.trigger');\n this.$element.trigger('toggled.zf.responsiveToggle');\n }\n }\n };\n\n _destroy() {\n this.$element.off('.zf.responsiveToggle');\n this.$toggler.off('.zf.responsiveToggle');\n\n $(window).off('changed.zf.mediaquery', this._updateMqHandler);\n }\n}\n\nResponsiveToggle.defaults = {\n /**\n * The breakpoint after which the menu is always shown, and the tab bar is hidden.\n * @option\n * @type {string}\n * @default 'medium'\n */\n hideFor: 'medium',\n\n /**\n * To decide if the toggle should be animated or not.\n * @option\n * @type {boolean}\n * @default false\n */\n animate: false\n};\n\nexport { ResponsiveToggle };\n","module.exports = __WEBPACK_EXTERNAL_MODULE_jquery__;"]}
|