va_common 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.travis.yml +4 -0
  4. data/CODE_OF_CONDUCT.md +13 -0
  5. data/Gemfile +4 -0
  6. data/README.md +66 -0
  7. data/Rakefile +1 -0
  8. data/app/assets/fonts/merriweather-bold-webfont.eot +0 -0
  9. data/app/assets/fonts/merriweather-bold-webfont.svg +294 -0
  10. data/app/assets/fonts/merriweather-bold-webfont.ttf +0 -0
  11. data/app/assets/fonts/merriweather-bold-webfont.woff +0 -0
  12. data/app/assets/fonts/merriweather-bold-webfont.woff2 +0 -0
  13. data/app/assets/fonts/merriweather-italic-webfont.eot +0 -0
  14. data/app/assets/fonts/merriweather-italic-webfont.svg +283 -0
  15. data/app/assets/fonts/merriweather-italic-webfont.ttf +0 -0
  16. data/app/assets/fonts/merriweather-italic-webfont.woff +0 -0
  17. data/app/assets/fonts/merriweather-italic-webfont.woff2 +0 -0
  18. data/app/assets/fonts/merriweather-light-webfont.eot +0 -0
  19. data/app/assets/fonts/merriweather-light-webfont.svg +299 -0
  20. data/app/assets/fonts/merriweather-light-webfont.ttf +0 -0
  21. data/app/assets/fonts/merriweather-light-webfont.woff +0 -0
  22. data/app/assets/fonts/merriweather-light-webfont.woff2 +0 -0
  23. data/app/assets/fonts/merriweather-regular-webfont.eot +0 -0
  24. data/app/assets/fonts/merriweather-regular-webfont.svg +294 -0
  25. data/app/assets/fonts/merriweather-regular-webfont.ttf +0 -0
  26. data/app/assets/fonts/merriweather-regular-webfont.woff +0 -0
  27. data/app/assets/fonts/merriweather-regular-webfont.woff2 +0 -0
  28. data/app/assets/fonts/sourcesanspro-bold-webfont.eot +0 -0
  29. data/app/assets/fonts/sourcesanspro-bold-webfont.svg +965 -0
  30. data/app/assets/fonts/sourcesanspro-bold-webfont.ttf +0 -0
  31. data/app/assets/fonts/sourcesanspro-bold-webfont.woff +0 -0
  32. data/app/assets/fonts/sourcesanspro-bold-webfont.woff2 +0 -0
  33. data/app/assets/fonts/sourcesanspro-italic-webfont.eot +0 -0
  34. data/app/assets/fonts/sourcesanspro-italic-webfont.svg +853 -0
  35. data/app/assets/fonts/sourcesanspro-italic-webfont.ttf +0 -0
  36. data/app/assets/fonts/sourcesanspro-italic-webfont.woff +0 -0
  37. data/app/assets/fonts/sourcesanspro-italic-webfont.woff2 +0 -0
  38. data/app/assets/fonts/sourcesanspro-light-webfont.eot +0 -0
  39. data/app/assets/fonts/sourcesanspro-light-webfont.svg +915 -0
  40. data/app/assets/fonts/sourcesanspro-light-webfont.ttf +0 -0
  41. data/app/assets/fonts/sourcesanspro-light-webfont.woff +0 -0
  42. data/app/assets/fonts/sourcesanspro-light-webfont.woff2 +0 -0
  43. data/app/assets/fonts/sourcesanspro-regular-webfont.eot +0 -0
  44. data/app/assets/fonts/sourcesanspro-regular-webfont.svg +989 -0
  45. data/app/assets/fonts/sourcesanspro-regular-webfont.ttf +0 -0
  46. data/app/assets/fonts/sourcesanspro-regular-webfont.woff +0 -0
  47. data/app/assets/fonts/sourcesanspro-regular-webfont.woff2 +0 -0
  48. data/app/assets/images/design/background/thread.png +0 -0
  49. data/app/assets/images/design/logo/logo-alt-hover.png +0 -0
  50. data/app/assets/images/design/logo/logo-alt.png +0 -0
  51. data/app/assets/images/design/logo/logo-hover.png +0 -0
  52. data/app/assets/images/design/logo/logo-small.png +0 -0
  53. data/app/assets/images/design/logo/logo.png +0 -0
  54. data/app/assets/images/design/logo/og-image.jpg +0 -0
  55. data/app/assets/images/design/seal/seal-footer.png +0 -0
  56. data/app/assets/images/design/seal/seal-footer.svg +1 -0
  57. data/app/assets/images/design/seal/seal.png +0 -0
  58. data/app/assets/images/design/seal/stars.png +0 -0
  59. data/app/assets/images/icons/apple-touch-icon-114x114.png +0 -0
  60. data/app/assets/images/icons/apple-touch-icon-152x152.png +0 -0
  61. data/app/assets/images/icons/apple-touch-icon-72x72.png +0 -0
  62. data/app/assets/images/icons/apple-touch-icon.png +0 -0
  63. data/app/assets/images/icons/favicon.ico +0 -0
  64. data/app/assets/images/icons/va.png +0 -0
  65. data/app/assets/images/icons/watermark.png +0 -0
  66. data/app/assets/images/icons/wrench.png +0 -0
  67. data/app/assets/images/social-icons/png/facebook25.png +0 -0
  68. data/app/assets/images/social-icons/png/rss25.png +0 -0
  69. data/app/assets/images/social-icons/png/twitter16.png +0 -0
  70. data/app/assets/images/social-icons/png/youtube15.png +0 -0
  71. data/app/assets/images/social-icons/svg/facebook25.svg +11 -0
  72. data/app/assets/images/social-icons/svg/rss25.svg +1 -0
  73. data/app/assets/images/social-icons/svg/twitter16.svg +15 -0
  74. data/app/assets/images/social-icons/svg/youtube15.svg +1 -0
  75. data/app/assets/js/components.js +376 -0
  76. data/app/assets/js/foundation/foundation.abide.js +408 -0
  77. data/app/assets/js/foundation/foundation.accordion.js +88 -0
  78. data/app/assets/js/foundation/foundation.alert.js +43 -0
  79. data/app/assets/js/foundation/foundation.clearing.js +586 -0
  80. data/app/assets/js/foundation/foundation.dropdown.js +463 -0
  81. data/app/assets/js/foundation/foundation.equalizer.js +104 -0
  82. data/app/assets/js/foundation/foundation.interchange.js +359 -0
  83. data/app/assets/js/foundation/foundation.joyride.js +932 -0
  84. data/app/assets/js/foundation/foundation.js +725 -0
  85. data/app/assets/js/foundation/foundation.magellan.js +215 -0
  86. data/app/assets/js/foundation/foundation.offcanvas.js +152 -0
  87. data/app/assets/js/foundation/foundation.orbit.js +476 -0
  88. data/app/assets/js/foundation/foundation.reveal.js +498 -0
  89. data/app/assets/js/foundation/foundation.slider.js +281 -0
  90. data/app/assets/js/foundation/foundation.tab.js +249 -0
  91. data/app/assets/js/foundation/foundation.tooltip.js +339 -0
  92. data/app/assets/js/foundation/foundation.topbar.js +458 -0
  93. data/app/assets/js/foundation.min.js +6376 -0
  94. data/app/assets/js/scripts-no-touch.js +33 -0
  95. data/app/assets/js/scripts-touch.js +33 -0
  96. data/app/assets/js/va_common_main.js +1 -0
  97. data/app/assets/js/vendor/classie.js +80 -0
  98. data/app/assets/js/vendor/html5shiv.js +8 -0
  99. data/app/assets/js/vendor/jquery-1.11.0.min.js +4 -0
  100. data/app/assets/js/vendor/jquery.js +9789 -0
  101. data/app/assets/js/vendor/jquery.smooth-scroll.js +255 -0
  102. data/app/assets/js/vendor/jquery.stellar.js +651 -0
  103. data/app/assets/js/vendor/jquery.tipsy.js +258 -0
  104. data/app/assets/js/vendor/menu.js +40 -0
  105. data/app/assets/js/vendor/modernizr.custom.js +4 -0
  106. data/app/assets/js/vendor/nwmatcher-1.2.5-min.js +7 -0
  107. data/app/assets/js/vendor/respond.min.js +6 -0
  108. data/app/assets/js/vendor/scroll-settings.js +3 -0
  109. data/app/assets/js/vendor/selectivizr-1.0.3b.js +560 -0
  110. data/app/assets/js/vendor/stellar-settings.js +8 -0
  111. data/app/assets/js/vendor/svg-injector.js +450 -0
  112. data/app/assets/js/vendor/tota11y.min.js +28 -0
  113. data/app/assets/js/vendor/wow.min.js +2 -0
  114. data/app/assets/stylesheets/_va.scss +2377 -0
  115. data/app/assets/stylesheets/components/_accordions.scss +98 -0
  116. data/app/assets/stylesheets/core/_base.scss +20 -0
  117. data/app/assets/stylesheets/core/_defaults.scss +92 -0
  118. data/app/assets/stylesheets/core/_grid-settings.scss +10 -0
  119. data/app/assets/stylesheets/core/_grid.scss +116 -0
  120. data/app/assets/stylesheets/core/_utilities.scss +105 -0
  121. data/app/assets/stylesheets/core/_variables.scss +88 -0
  122. data/app/assets/stylesheets/elements/_buttons.scss +189 -0
  123. data/app/assets/stylesheets/elements/_figure.scss +9 -0
  124. data/app/assets/stylesheets/elements/_inputs.scss +328 -0
  125. data/app/assets/stylesheets/elements/_labels.scss +39 -0
  126. data/app/assets/stylesheets/elements/_list.scss +82 -0
  127. data/app/assets/stylesheets/elements/_table.scss +39 -0
  128. data/app/assets/stylesheets/elements/_typography.scss +220 -0
  129. data/app/assets/stylesheets/foundation/_functions.scss +146 -0
  130. data/app/assets/stylesheets/foundation/_settings.scss +1467 -0
  131. data/app/assets/stylesheets/foundation/_variables.scss +1286 -0
  132. data/app/assets/stylesheets/foundation/components/_accordion.scss +157 -0
  133. data/app/assets/stylesheets/foundation/components/_alert-boxes.scss +128 -0
  134. data/app/assets/stylesheets/foundation/components/_block-grid.scss +132 -0
  135. data/app/assets/stylesheets/foundation/components/_breadcrumbs.scss +132 -0
  136. data/app/assets/stylesheets/foundation/components/_button-groups.scss +200 -0
  137. data/app/assets/stylesheets/foundation/components/_buttons.scss +259 -0
  138. data/app/assets/stylesheets/foundation/components/_clearing.scss +256 -0
  139. data/app/assets/stylesheets/foundation/components/_dropdown-buttons.scss +131 -0
  140. data/app/assets/stylesheets/foundation/components/_dropdown.scss +262 -0
  141. data/app/assets/stylesheets/foundation/components/_flex-video.scss +51 -0
  142. data/app/assets/stylesheets/foundation/components/_forms.scss +570 -0
  143. data/app/assets/stylesheets/foundation/components/_global.scss +481 -0
  144. data/app/assets/stylesheets/foundation/components/_grid.scss +289 -0
  145. data/app/assets/stylesheets/foundation/components/_icon-bar.scss +358 -0
  146. data/app/assets/stylesheets/foundation/components/_inline-lists.scss +57 -0
  147. data/app/assets/stylesheets/foundation/components/_joyride.scss +222 -0
  148. data/app/assets/stylesheets/foundation/components/_keystrokes.scss +61 -0
  149. data/app/assets/stylesheets/foundation/components/_labels.scss +106 -0
  150. data/app/assets/stylesheets/foundation/components/_magellan.scss +34 -0
  151. data/app/assets/stylesheets/foundation/components/_offcanvas.scss +515 -0
  152. data/app/assets/stylesheets/foundation/components/_orbit.scss +368 -0
  153. data/app/assets/stylesheets/foundation/components/_pagination.scss +162 -0
  154. data/app/assets/stylesheets/foundation/components/_panels.scss +101 -0
  155. data/app/assets/stylesheets/foundation/components/_pricing-tables.scss +150 -0
  156. data/app/assets/stylesheets/foundation/components/_progress-bars.scss +79 -0
  157. data/app/assets/stylesheets/foundation/components/_range-slider.scss +169 -0
  158. data/app/assets/stylesheets/foundation/components/_reveal.scss +202 -0
  159. data/app/assets/stylesheets/foundation/components/_side-nav.scss +116 -0
  160. data/app/assets/stylesheets/foundation/components/_split-buttons.scss +199 -0
  161. data/app/assets/stylesheets/foundation/components/_sub-nav.scss +123 -0
  162. data/app/assets/stylesheets/foundation/components/_switches.scss +238 -0
  163. data/app/assets/stylesheets/foundation/components/_tables.scss +135 -0
  164. data/app/assets/stylesheets/foundation/components/_tabs.scss +123 -0
  165. data/app/assets/stylesheets/foundation/components/_thumbs.scss +66 -0
  166. data/app/assets/stylesheets/foundation/components/_toolbar.scss +70 -0
  167. data/app/assets/stylesheets/foundation/components/_tooltips.scss +142 -0
  168. data/app/assets/stylesheets/foundation/components/_top-bar.scss +691 -0
  169. data/app/assets/stylesheets/foundation/components/_type.scss +525 -0
  170. data/app/assets/stylesheets/foundation/components/_visibility.scss +408 -0
  171. data/app/assets/stylesheets/functions/_new-breakpoint.scss +49 -0
  172. data/app/assets/stylesheets/functions/_private.scss +114 -0
  173. data/app/assets/stylesheets/lib/_normalize.scss +427 -0
  174. data/app/assets/stylesheets/lib/bourbon/_bourbon-deprecated-upcoming.scss +411 -0
  175. data/app/assets/stylesheets/lib/bourbon/_bourbon.scss +87 -0
  176. data/app/assets/stylesheets/lib/bourbon/addons/_border-color.scss +26 -0
  177. data/app/assets/stylesheets/lib/bourbon/addons/_border-radius.scss +48 -0
  178. data/app/assets/stylesheets/lib/bourbon/addons/_border-style.scss +25 -0
  179. data/app/assets/stylesheets/lib/bourbon/addons/_border-width.scss +25 -0
  180. data/app/assets/stylesheets/lib/bourbon/addons/_buttons.scss +64 -0
  181. data/app/assets/stylesheets/lib/bourbon/addons/_clearfix.scss +25 -0
  182. data/app/assets/stylesheets/lib/bourbon/addons/_ellipsis.scss +30 -0
  183. data/app/assets/stylesheets/lib/bourbon/addons/_font-stacks.scss +31 -0
  184. data/app/assets/stylesheets/lib/bourbon/addons/_hide-text.scss +27 -0
  185. data/app/assets/stylesheets/lib/bourbon/addons/_margin.scss +26 -0
  186. data/app/assets/stylesheets/lib/bourbon/addons/_padding.scss +26 -0
  187. data/app/assets/stylesheets/lib/bourbon/addons/_position.scss +48 -0
  188. data/app/assets/stylesheets/lib/bourbon/addons/_prefixer.scss +66 -0
  189. data/app/assets/stylesheets/lib/bourbon/addons/_retina-image.scss +25 -0
  190. data/app/assets/stylesheets/lib/bourbon/addons/_size.scss +51 -0
  191. data/app/assets/stylesheets/lib/bourbon/addons/_text-inputs.scss +112 -0
  192. data/app/assets/stylesheets/lib/bourbon/addons/_timing-functions.scss +34 -0
  193. data/app/assets/stylesheets/lib/bourbon/addons/_triangle.scss +63 -0
  194. data/app/assets/stylesheets/lib/bourbon/addons/_word-wrap.scss +29 -0
  195. data/app/assets/stylesheets/lib/bourbon/css3/_animation.scss +43 -0
  196. data/app/assets/stylesheets/lib/bourbon/css3/_appearance.scss +3 -0
  197. data/app/assets/stylesheets/lib/bourbon/css3/_backface-visibility.scss +3 -0
  198. data/app/assets/stylesheets/lib/bourbon/css3/_background-image.scss +42 -0
  199. data/app/assets/stylesheets/lib/bourbon/css3/_background.scss +55 -0
  200. data/app/assets/stylesheets/lib/bourbon/css3/_border-image.scss +59 -0
  201. data/app/assets/stylesheets/lib/bourbon/css3/_calc.scss +4 -0
  202. data/app/assets/stylesheets/lib/bourbon/css3/_columns.scss +47 -0
  203. data/app/assets/stylesheets/lib/bourbon/css3/_filter.scss +4 -0
  204. data/app/assets/stylesheets/lib/bourbon/css3/_flex-box.scss +287 -0
  205. data/app/assets/stylesheets/lib/bourbon/css3/_font-face.scss +24 -0
  206. data/app/assets/stylesheets/lib/bourbon/css3/_font-feature-settings.scss +4 -0
  207. data/app/assets/stylesheets/lib/bourbon/css3/_hidpi-media-query.scss +10 -0
  208. data/app/assets/stylesheets/lib/bourbon/css3/_hyphens.scss +4 -0
  209. data/app/assets/stylesheets/lib/bourbon/css3/_image-rendering.scss +14 -0
  210. data/app/assets/stylesheets/lib/bourbon/css3/_keyframes.scss +36 -0
  211. data/app/assets/stylesheets/lib/bourbon/css3/_linear-gradient.scss +38 -0
  212. data/app/assets/stylesheets/lib/bourbon/css3/_perspective.scss +8 -0
  213. data/app/assets/stylesheets/lib/bourbon/css3/_placeholder.scss +8 -0
  214. data/app/assets/stylesheets/lib/bourbon/css3/_radial-gradient.scss +39 -0
  215. data/app/assets/stylesheets/lib/bourbon/css3/_selection.scss +42 -0
  216. data/app/assets/stylesheets/lib/bourbon/css3/_text-decoration.scss +19 -0
  217. data/app/assets/stylesheets/lib/bourbon/css3/_transform.scss +15 -0
  218. data/app/assets/stylesheets/lib/bourbon/css3/_transition.scss +71 -0
  219. data/app/assets/stylesheets/lib/bourbon/css3/_user-select.scss +3 -0
  220. data/app/assets/stylesheets/lib/bourbon/functions/_assign-inputs.scss +11 -0
  221. data/app/assets/stylesheets/lib/bourbon/functions/_contains-falsy.scss +20 -0
  222. data/app/assets/stylesheets/lib/bourbon/functions/_contains.scss +26 -0
  223. data/app/assets/stylesheets/lib/bourbon/functions/_is-length.scss +11 -0
  224. data/app/assets/stylesheets/lib/bourbon/functions/_is-light.scss +21 -0
  225. data/app/assets/stylesheets/lib/bourbon/functions/_is-number.scss +11 -0
  226. data/app/assets/stylesheets/lib/bourbon/functions/_is-size.scss +13 -0
  227. data/app/assets/stylesheets/lib/bourbon/functions/_modular-scale.scss +69 -0
  228. data/app/assets/stylesheets/lib/bourbon/functions/_px-to-em.scss +13 -0
  229. data/app/assets/stylesheets/lib/bourbon/functions/_px-to-rem.scss +15 -0
  230. data/app/assets/stylesheets/lib/bourbon/functions/_shade.scss +24 -0
  231. data/app/assets/stylesheets/lib/bourbon/functions/_strip-units.scss +17 -0
  232. data/app/assets/stylesheets/lib/bourbon/functions/_tint.scss +24 -0
  233. data/app/assets/stylesheets/lib/bourbon/functions/_transition-property-name.scss +22 -0
  234. data/app/assets/stylesheets/lib/bourbon/functions/_unpack.scss +27 -0
  235. data/app/assets/stylesheets/lib/bourbon/helpers/_convert-units.scss +21 -0
  236. data/app/assets/stylesheets/lib/bourbon/helpers/_directional-values.scss +96 -0
  237. data/app/assets/stylesheets/lib/bourbon/helpers/_font-source-declaration.scss +43 -0
  238. data/app/assets/stylesheets/lib/bourbon/helpers/_gradient-positions-parser.scss +13 -0
  239. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-angle-parser.scss +25 -0
  240. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-gradient-parser.scss +41 -0
  241. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-positions-parser.scss +61 -0
  242. data/app/assets/stylesheets/lib/bourbon/helpers/_linear-side-corner-parser.scss +31 -0
  243. data/app/assets/stylesheets/lib/bourbon/helpers/_radial-arg-parser.scss +69 -0
  244. data/app/assets/stylesheets/lib/bourbon/helpers/_radial-gradient-parser.scss +50 -0
  245. data/app/assets/stylesheets/lib/bourbon/helpers/_radial-positions-parser.scss +18 -0
  246. data/app/assets/stylesheets/lib/bourbon/helpers/_render-gradients.scss +26 -0
  247. data/app/assets/stylesheets/lib/bourbon/helpers/_shape-size-stripper.scss +10 -0
  248. data/app/assets/stylesheets/lib/bourbon/helpers/_str-to-num.scss +50 -0
  249. data/app/assets/stylesheets/lib/bourbon/settings/_asset-pipeline.scss +7 -0
  250. data/app/assets/stylesheets/lib/bourbon/settings/_prefixer.scss +9 -0
  251. data/app/assets/stylesheets/lib/bourbon/settings/_px-to-em.scss +1 -0
  252. data/app/assets/stylesheets/lib/neat/_neat-helpers.scss +8 -0
  253. data/app/assets/stylesheets/lib/neat/_neat.scss +23 -0
  254. data/app/assets/stylesheets/lib/neat/functions/_new-breakpoint.scss +49 -0
  255. data/app/assets/stylesheets/lib/neat/functions/_private.scss +114 -0
  256. data/app/assets/stylesheets/lib/neat/grid/_box-sizing.scss +15 -0
  257. data/app/assets/stylesheets/lib/neat/grid/_direction-context.scss +33 -0
  258. data/app/assets/stylesheets/lib/neat/grid/_display-context.scss +28 -0
  259. data/app/assets/stylesheets/lib/neat/grid/_fill-parent.scss +22 -0
  260. data/app/assets/stylesheets/lib/neat/grid/_media.scss +92 -0
  261. data/app/assets/stylesheets/lib/neat/grid/_omega.scss +87 -0
  262. data/app/assets/stylesheets/lib/neat/grid/_outer-container.scss +38 -0
  263. data/app/assets/stylesheets/lib/neat/grid/_pad.scss +25 -0
  264. data/app/assets/stylesheets/lib/neat/grid/_private.scss +35 -0
  265. data/app/assets/stylesheets/lib/neat/grid/_row.scss +52 -0
  266. data/app/assets/stylesheets/lib/neat/grid/_shift.scss +50 -0
  267. data/app/assets/stylesheets/lib/neat/grid/_span-columns.scss +94 -0
  268. data/app/assets/stylesheets/lib/neat/grid/_to-deprecate.scss +97 -0
  269. data/app/assets/stylesheets/lib/neat/grid/_visual-grid.scss +42 -0
  270. data/app/assets/stylesheets/lib/neat/settings/_disable-warnings.scss +13 -0
  271. data/app/assets/stylesheets/lib/neat/settings/_grid.scss +51 -0
  272. data/app/assets/stylesheets/lib/neat/settings/_visual-grid.scss +27 -0
  273. data/app/assets/stylesheets/va_common_main.css.scss +18 -0
  274. data/bin/console +14 -0
  275. data/bin/setup +7 -0
  276. data/lib/generators/files/_footer.html.erb +89 -0
  277. data/lib/generators/files/_header.html.erb +7 -0
  278. data/lib/generators/va_common_generator.rb +6 -0
  279. data/lib/generators/va_footer_generator.rb +7 -0
  280. data/lib/generators/va_header_generator.rb +7 -0
  281. data/lib/va_common/engine.rb +4 -0
  282. data/lib/va_common/version.rb +3 -0
  283. data/lib/va_common.rb +2 -0
  284. data/va_common.gemspec +22 -0
  285. metadata +354 -0
@@ -0,0 +1,281 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.slider = {
5
+ name : 'slider',
6
+
7
+ version : '5.5.2',
8
+
9
+ settings : {
10
+ start : 0,
11
+ end : 100,
12
+ step : 1,
13
+ precision : null,
14
+ initial : null,
15
+ display_selector : '',
16
+ vertical : false,
17
+ trigger_input_change : false,
18
+ on_change : function () {}
19
+ },
20
+
21
+ cache : {},
22
+
23
+ init : function (scope, method, options) {
24
+ Foundation.inherit(this, 'throttle');
25
+ this.bindings(method, options);
26
+ this.reflow();
27
+ },
28
+
29
+ events : function () {
30
+ var self = this;
31
+
32
+ $(this.scope)
33
+ .off('.slider')
34
+ .on('mousedown.fndtn.slider touchstart.fndtn.slider pointerdown.fndtn.slider',
35
+ '[' + self.attr_name() + ']:not(.disabled, [disabled]) .range-slider-handle', function (e) {
36
+ if (!self.cache.active) {
37
+ e.preventDefault();
38
+ self.set_active_slider($(e.target));
39
+ }
40
+ })
41
+ .on('mousemove.fndtn.slider touchmove.fndtn.slider pointermove.fndtn.slider', function (e) {
42
+ if (!!self.cache.active) {
43
+ e.preventDefault();
44
+ if ($.data(self.cache.active[0], 'settings').vertical) {
45
+ var scroll_offset = 0;
46
+ if (!e.pageY) {
47
+ scroll_offset = window.scrollY;
48
+ }
49
+ self.calculate_position(self.cache.active, self.get_cursor_position(e, 'y') + scroll_offset);
50
+ } else {
51
+ self.calculate_position(self.cache.active, self.get_cursor_position(e, 'x'));
52
+ }
53
+ }
54
+ })
55
+ .on('mouseup.fndtn.slider touchend.fndtn.slider pointerup.fndtn.slider', function (e) {
56
+ self.remove_active_slider();
57
+ })
58
+ .on('change.fndtn.slider', function (e) {
59
+ self.settings.on_change();
60
+ });
61
+
62
+ self.S(window)
63
+ .on('resize.fndtn.slider', self.throttle(function (e) {
64
+ self.reflow();
65
+ }, 300));
66
+
67
+ // update slider value as users change input value
68
+ this.S('[' + this.attr_name() + ']').each(function () {
69
+ var slider = $(this),
70
+ handle = slider.children('.range-slider-handle')[0],
71
+ settings = self.initialize_settings(handle);
72
+
73
+ if (settings.display_selector != '') {
74
+ $(settings.display_selector).each(function(){
75
+ if (this.hasOwnProperty('value')) {
76
+ $(this).change(function(){
77
+ // is there a better way to do this?
78
+ slider.foundation("slider", "set_value", $(this).val());
79
+ });
80
+ }
81
+ });
82
+ }
83
+ });
84
+ },
85
+
86
+ get_cursor_position : function (e, xy) {
87
+ var pageXY = 'page' + xy.toUpperCase(),
88
+ clientXY = 'client' + xy.toUpperCase(),
89
+ position;
90
+
91
+ if (typeof e[pageXY] !== 'undefined') {
92
+ position = e[pageXY];
93
+ } else if (typeof e.originalEvent[clientXY] !== 'undefined') {
94
+ position = e.originalEvent[clientXY];
95
+ } else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0][clientXY] !== 'undefined') {
96
+ position = e.originalEvent.touches[0][clientXY];
97
+ } else if (e.currentPoint && typeof e.currentPoint[xy] !== 'undefined') {
98
+ position = e.currentPoint[xy];
99
+ }
100
+
101
+ return position;
102
+ },
103
+
104
+ set_active_slider : function ($handle) {
105
+ this.cache.active = $handle;
106
+ },
107
+
108
+ remove_active_slider : function () {
109
+ this.cache.active = null;
110
+ },
111
+
112
+ calculate_position : function ($handle, cursor_x) {
113
+ var self = this,
114
+ settings = $.data($handle[0], 'settings'),
115
+ handle_l = $.data($handle[0], 'handle_l'),
116
+ handle_o = $.data($handle[0], 'handle_o'),
117
+ bar_l = $.data($handle[0], 'bar_l'),
118
+ bar_o = $.data($handle[0], 'bar_o');
119
+
120
+ requestAnimationFrame(function () {
121
+ var pct;
122
+
123
+ if (Foundation.rtl && !settings.vertical) {
124
+ pct = self.limit_to(((bar_o + bar_l - cursor_x) / bar_l), 0, 1);
125
+ } else {
126
+ pct = self.limit_to(((cursor_x - bar_o) / bar_l), 0, 1);
127
+ }
128
+
129
+ pct = settings.vertical ? 1 - pct : pct;
130
+
131
+ var norm = self.normalized_value(pct, settings.start, settings.end, settings.step, settings.precision);
132
+
133
+ self.set_ui($handle, norm);
134
+ });
135
+ },
136
+
137
+ set_ui : function ($handle, value) {
138
+ var settings = $.data($handle[0], 'settings'),
139
+ handle_l = $.data($handle[0], 'handle_l'),
140
+ bar_l = $.data($handle[0], 'bar_l'),
141
+ norm_pct = this.normalized_percentage(value, settings.start, settings.end),
142
+ handle_offset = norm_pct * (bar_l - handle_l) - 1,
143
+ progress_bar_length = norm_pct * 100,
144
+ $handle_parent = $handle.parent(),
145
+ $hidden_inputs = $handle.parent().children('input[type=hidden]');
146
+
147
+ if (Foundation.rtl && !settings.vertical) {
148
+ handle_offset = -handle_offset;
149
+ }
150
+
151
+ handle_offset = settings.vertical ? -handle_offset + bar_l - handle_l + 1 : handle_offset;
152
+ this.set_translate($handle, handle_offset, settings.vertical);
153
+
154
+ if (settings.vertical) {
155
+ $handle.siblings('.range-slider-active-segment').css('height', progress_bar_length + '%');
156
+ } else {
157
+ $handle.siblings('.range-slider-active-segment').css('width', progress_bar_length + '%');
158
+ }
159
+
160
+ $handle_parent.attr(this.attr_name(), value).trigger('change.fndtn.slider');
161
+
162
+ $hidden_inputs.val(value);
163
+ if (settings.trigger_input_change) {
164
+ $hidden_inputs.trigger('change.fndtn.slider');
165
+ }
166
+
167
+ if (!$handle[0].hasAttribute('aria-valuemin')) {
168
+ $handle.attr({
169
+ 'aria-valuemin' : settings.start,
170
+ 'aria-valuemax' : settings.end
171
+ });
172
+ }
173
+ $handle.attr('aria-valuenow', value);
174
+
175
+ if (settings.display_selector != '') {
176
+ $(settings.display_selector).each(function () {
177
+ if (this.hasAttribute('value')) {
178
+ $(this).val(value);
179
+ } else {
180
+ $(this).text(value);
181
+ }
182
+ });
183
+ }
184
+
185
+ },
186
+
187
+ normalized_percentage : function (val, start, end) {
188
+ return Math.min(1, (val - start) / (end - start));
189
+ },
190
+
191
+ normalized_value : function (val, start, end, step, precision) {
192
+ var range = end - start,
193
+ point = val * range,
194
+ mod = (point - (point % step)) / step,
195
+ rem = point % step,
196
+ round = ( rem >= step * 0.5 ? step : 0);
197
+ return ((mod * step + round) + start).toFixed(precision);
198
+ },
199
+
200
+ set_translate : function (ele, offset, vertical) {
201
+ if (vertical) {
202
+ $(ele)
203
+ .css('-webkit-transform', 'translateY(' + offset + 'px)')
204
+ .css('-moz-transform', 'translateY(' + offset + 'px)')
205
+ .css('-ms-transform', 'translateY(' + offset + 'px)')
206
+ .css('-o-transform', 'translateY(' + offset + 'px)')
207
+ .css('transform', 'translateY(' + offset + 'px)');
208
+ } else {
209
+ $(ele)
210
+ .css('-webkit-transform', 'translateX(' + offset + 'px)')
211
+ .css('-moz-transform', 'translateX(' + offset + 'px)')
212
+ .css('-ms-transform', 'translateX(' + offset + 'px)')
213
+ .css('-o-transform', 'translateX(' + offset + 'px)')
214
+ .css('transform', 'translateX(' + offset + 'px)');
215
+ }
216
+ },
217
+
218
+ limit_to : function (val, min, max) {
219
+ return Math.min(Math.max(val, min), max);
220
+ },
221
+
222
+ initialize_settings : function (handle) {
223
+ var settings = $.extend({}, this.settings, this.data_options($(handle).parent())),
224
+ decimal_places_match_result;
225
+
226
+ if (settings.precision === null) {
227
+ decimal_places_match_result = ('' + settings.step).match(/\.([\d]*)/);
228
+ settings.precision = decimal_places_match_result && decimal_places_match_result[1] ? decimal_places_match_result[1].length : 0;
229
+ }
230
+
231
+ if (settings.vertical) {
232
+ $.data(handle, 'bar_o', $(handle).parent().offset().top);
233
+ $.data(handle, 'bar_l', $(handle).parent().outerHeight());
234
+ $.data(handle, 'handle_o', $(handle).offset().top);
235
+ $.data(handle, 'handle_l', $(handle).outerHeight());
236
+ } else {
237
+ $.data(handle, 'bar_o', $(handle).parent().offset().left);
238
+ $.data(handle, 'bar_l', $(handle).parent().outerWidth());
239
+ $.data(handle, 'handle_o', $(handle).offset().left);
240
+ $.data(handle, 'handle_l', $(handle).outerWidth());
241
+ }
242
+
243
+ $.data(handle, 'bar', $(handle).parent());
244
+ return $.data(handle, 'settings', settings);
245
+ },
246
+
247
+ set_initial_position : function ($ele) {
248
+ var settings = $.data($ele.children('.range-slider-handle')[0], 'settings'),
249
+ initial = ((typeof settings.initial == 'number' && !isNaN(settings.initial)) ? settings.initial : Math.floor((settings.end - settings.start) * 0.5 / settings.step) * settings.step + settings.start),
250
+ $handle = $ele.children('.range-slider-handle');
251
+ this.set_ui($handle, initial);
252
+ },
253
+
254
+ set_value : function (value) {
255
+ var self = this;
256
+ $('[' + self.attr_name() + ']', this.scope).each(function () {
257
+ $(this).attr(self.attr_name(), value);
258
+ });
259
+ if (!!$(this.scope).attr(self.attr_name())) {
260
+ $(this.scope).attr(self.attr_name(), value);
261
+ }
262
+ self.reflow();
263
+ },
264
+
265
+ reflow : function () {
266
+ var self = this;
267
+ self.S('[' + this.attr_name() + ']').each(function () {
268
+ var handle = $(this).children('.range-slider-handle')[0],
269
+ val = $(this).attr(self.attr_name());
270
+ self.initialize_settings(handle);
271
+
272
+ if (val) {
273
+ self.set_ui($(handle), parseFloat(val));
274
+ } else {
275
+ self.set_initial_position($(this));
276
+ }
277
+ });
278
+ }
279
+ };
280
+
281
+ }(jQuery, window, window.document));
@@ -0,0 +1,249 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.tab = {
5
+ name : 'tab',
6
+
7
+ version : '5.5.2',
8
+
9
+ settings : {
10
+ active_class : 'active',
11
+ callback : function () {},
12
+ deep_linking : false,
13
+ scroll_to_content : true,
14
+ is_hover : false
15
+ },
16
+
17
+ default_tab_hashes : [],
18
+
19
+ init : function (scope, method, options) {
20
+ var self = this,
21
+ S = this.S;
22
+
23
+ // Store the default active tabs which will be referenced when the
24
+ // location hash is absent, as in the case of navigating the tabs and
25
+ // returning to the first viewing via the browser Back button.
26
+ S('[' + this.attr_name() + '] > .active > a', this.scope).each(function () {
27
+ self.default_tab_hashes.push(this.hash);
28
+ });
29
+
30
+ // store the initial href, which is used to allow correct behaviour of the
31
+ // browser back button when deep linking is turned on.
32
+ self.entry_location = window.location.href;
33
+
34
+ this.bindings(method, options);
35
+ this.handle_location_hash_change();
36
+ },
37
+
38
+ events : function () {
39
+ var self = this,
40
+ S = this.S;
41
+
42
+ var usual_tab_behavior = function (e, target) {
43
+ var settings = S(target).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
44
+ if (!settings.is_hover || Modernizr.touch) {
45
+ e.preventDefault();
46
+ e.stopPropagation();
47
+ self.toggle_active_tab(S(target).parent());
48
+ }
49
+ };
50
+
51
+ S(this.scope)
52
+ .off('.tab')
53
+ // Key event: focus/tab key
54
+ .on('keydown.fndtn.tab', '[' + this.attr_name() + '] > * > a', function(e) {
55
+ var el = this;
56
+ var keyCode = e.keyCode || e.which;
57
+ // if user pressed tab key
58
+ if (keyCode == 9) {
59
+ e.preventDefault();
60
+ // TODO: Change usual_tab_behavior into accessibility function?
61
+ usual_tab_behavior(e, el);
62
+ }
63
+ })
64
+ // Click event: tab title
65
+ .on('click.fndtn.tab', '[' + this.attr_name() + '] > * > a', function(e) {
66
+ var el = this;
67
+ usual_tab_behavior(e, el);
68
+ })
69
+ // Hover event: tab title
70
+ .on('mouseenter.fndtn.tab', '[' + this.attr_name() + '] > * > a', function (e) {
71
+ var settings = S(this).closest('[' + self.attr_name() + ']').data(self.attr_name(true) + '-init');
72
+ if (settings.is_hover) {
73
+ self.toggle_active_tab(S(this).parent());
74
+ }
75
+ });
76
+
77
+ // Location hash change event
78
+ S(window).on('hashchange.fndtn.tab', function (e) {
79
+ e.preventDefault();
80
+ self.handle_location_hash_change();
81
+ });
82
+ },
83
+
84
+ handle_location_hash_change : function () {
85
+
86
+ var self = this,
87
+ S = this.S;
88
+
89
+ S('[' + this.attr_name() + ']', this.scope).each(function () {
90
+ var settings = S(this).data(self.attr_name(true) + '-init');
91
+ if (settings.deep_linking) {
92
+ // Match the location hash to a label
93
+ var hash;
94
+ if (settings.scroll_to_content) {
95
+ hash = self.scope.location.hash;
96
+ } else {
97
+ // prefix the hash to prevent anchor scrolling
98
+ hash = self.scope.location.hash.replace('fndtn-', '');
99
+ }
100
+ if (hash != '') {
101
+ // Check whether the location hash references a tab content div or
102
+ // another element on the page (inside or outside the tab content div)
103
+ var hash_element = S(hash);
104
+ if (hash_element.hasClass('content') && hash_element.parent().hasClass('tabs-content')) {
105
+ // Tab content div
106
+ self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + hash + ']').parent());
107
+ } else {
108
+ // Not the tab content div. If inside the tab content, find the
109
+ // containing tab and toggle it as active.
110
+ var hash_tab_container_id = hash_element.closest('.content').attr('id');
111
+ if (hash_tab_container_id != undefined) {
112
+ self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=#' + hash_tab_container_id + ']').parent(), hash);
113
+ }
114
+ }
115
+ } else {
116
+ // Reference the default tab hashes which were initialized in the init function
117
+ for (var ind = 0; ind < self.default_tab_hashes.length; ind++) {
118
+ self.toggle_active_tab($('[' + self.attr_name() + '] > * > a[href=' + self.default_tab_hashes[ind] + ']').parent());
119
+ }
120
+ }
121
+ }
122
+ });
123
+ },
124
+
125
+ toggle_active_tab : function (tab, location_hash) {
126
+ var self = this,
127
+ S = self.S,
128
+ tabs = tab.closest('[' + this.attr_name() + ']'),
129
+ tab_link = tab.find('a'),
130
+ anchor = tab.children('a').first(),
131
+ target_hash = '#' + anchor.attr('href').split('#')[1],
132
+ target = S(target_hash),
133
+ siblings = tab.siblings(),
134
+ settings = tabs.data(this.attr_name(true) + '-init'),
135
+ interpret_keyup_action = function (e) {
136
+ // Light modification of Heydon Pickering's Practical ARIA Examples: http://heydonworks.com/practical_aria_examples/js/a11y.js
137
+
138
+ // define current, previous and next (possible) tabs
139
+
140
+ var $original = $(this);
141
+ var $prev = $(this).parents('li').prev().children('[role="tab"]');
142
+ var $next = $(this).parents('li').next().children('[role="tab"]');
143
+ var $target;
144
+
145
+ // find the direction (prev or next)
146
+
147
+ switch (e.keyCode) {
148
+ case 37:
149
+ $target = $prev;
150
+ break;
151
+ case 39:
152
+ $target = $next;
153
+ break;
154
+ default:
155
+ $target = false
156
+ break;
157
+ }
158
+
159
+ if ($target.length) {
160
+ $original.attr({
161
+ 'tabindex' : '-1',
162
+ 'aria-selected' : null
163
+ });
164
+ $target.attr({
165
+ 'tabindex' : '0',
166
+ 'aria-selected' : true
167
+ }).focus();
168
+ }
169
+
170
+ // Hide panels
171
+
172
+ $('[role="tabpanel"]')
173
+ .attr('aria-hidden', 'true');
174
+
175
+ // Show panel which corresponds to target
176
+
177
+ $('#' + $(document.activeElement).attr('href').substring(1))
178
+ .attr('aria-hidden', null);
179
+
180
+ },
181
+ go_to_hash = function(hash) {
182
+ // This function allows correct behaviour of the browser's back button when deep linking is enabled. Without it
183
+ // the user would get continually redirected to the default hash.
184
+ var is_entry_location = window.location.href === self.entry_location,
185
+ default_hash = settings.scroll_to_content ? self.default_tab_hashes[0] : is_entry_location ? window.location.hash :'fndtn-' + self.default_tab_hashes[0].replace('#', '')
186
+
187
+ if (!(is_entry_location && hash === default_hash)) {
188
+ window.location.hash = hash;
189
+ }
190
+ };
191
+
192
+ // allow usage of data-tab-content attribute instead of href
193
+ if (anchor.data('tab-content')) {
194
+ target_hash = '#' + anchor.data('tab-content').split('#')[1];
195
+ target = S(target_hash);
196
+ }
197
+
198
+ if (settings.deep_linking) {
199
+
200
+ if (settings.scroll_to_content) {
201
+
202
+ // retain current hash to scroll to content
203
+ go_to_hash(location_hash || target_hash);
204
+
205
+ if (location_hash == undefined || location_hash == target_hash) {
206
+ tab.parent()[0].scrollIntoView();
207
+ } else {
208
+ S(target_hash)[0].scrollIntoView();
209
+ }
210
+ } else {
211
+ // prefix the hashes so that the browser doesn't scroll down
212
+ if (location_hash != undefined) {
213
+ go_to_hash('fndtn-' + location_hash.replace('#', ''));
214
+ } else {
215
+ go_to_hash('fndtn-' + target_hash.replace('#', ''));
216
+ }
217
+ }
218
+ }
219
+
220
+ // WARNING: The activation and deactivation of the tab content must
221
+ // occur after the deep linking in order to properly refresh the browser
222
+ // window (notably in Chrome).
223
+ // Clean up multiple attr instances to done once
224
+ tab.addClass(settings.active_class).triggerHandler('opened');
225
+ tab_link.attr({'aria-selected' : 'true', tabindex : 0});
226
+ siblings.removeClass(settings.active_class)
227
+ siblings.find('a').attr({'aria-selected' : 'false', tabindex : -1});
228
+ target.siblings().removeClass(settings.active_class).attr({'aria-hidden' : 'true', tabindex : -1});
229
+ target.addClass(settings.active_class).attr('aria-hidden', 'false').removeAttr('tabindex');
230
+ settings.callback(tab);
231
+ target.triggerHandler('toggled', [target]);
232
+ tabs.triggerHandler('toggled', [tab]);
233
+
234
+ tab_link.off('keydown').on('keydown', interpret_keyup_action );
235
+ },
236
+
237
+ data_attr : function (str) {
238
+ if (this.namespace.length > 0) {
239
+ return this.namespace + '-' + str;
240
+ }
241
+
242
+ return str;
243
+ },
244
+
245
+ off : function () {},
246
+
247
+ reflow : function () {}
248
+ };
249
+ }(jQuery, window, window.document));