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,408 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.abide = {
5
+ name : 'abide',
6
+
7
+ version : '5.5.2',
8
+
9
+ settings : {
10
+ live_validate : true,
11
+ validate_on_blur : true,
12
+ // validate_on: 'tab', // tab (when user tabs between fields), change (input changes), manual (call custom events)
13
+ focus_on_invalid : true,
14
+ error_labels : true, // labels with a for="inputId" will recieve an `error` class
15
+ error_class : 'error',
16
+ timeout : 1000,
17
+ patterns : {
18
+ alpha : /^[a-zA-Z]+$/,
19
+ alpha_numeric : /^[a-zA-Z0-9]+$/,
20
+ integer : /^[-+]?\d+$/,
21
+ number : /^[-+]?\d*(?:[\.\,]\d+)?$/,
22
+
23
+ // amex, visa, diners
24
+ card : /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})$/,
25
+ cvv : /^([0-9]){3,4}$/,
26
+
27
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/states-of-the-type-attribute.html#valid-e-mail-address
28
+ email : /^[a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+$/,
29
+
30
+ // http://blogs.lse.ac.uk/lti/2008/04/23/a-regular-expression-to-match-any-url/
31
+ url: /^(https?|ftp|file|ssh):\/\/([-;:&=\+\$,\w]+@{1})?([-A-Za-z0-9\.]+)+:?(\d+)?((\/[-\+~%\/\.\w]+)?\??([-\+=&;%@\.\w]+)?#?([\w]+)?)?/,
32
+ // abc.de
33
+ domain : /^([a-zA-Z0-9]([a-zA-Z0-9\-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,8}$/,
34
+
35
+ datetime : /^([0-2][0-9]{3})\-([0-1][0-9])\-([0-3][0-9])T([0-5][0-9])\:([0-5][0-9])\:([0-5][0-9])(Z|([\-\+]([0-1][0-9])\:00))$/,
36
+ // YYYY-MM-DD
37
+ date : /(?:19|20)[0-9]{2}-(?:(?:0[1-9]|1[0-2])-(?:0[1-9]|1[0-9]|2[0-9])|(?:(?!02)(?:0[1-9]|1[0-2])-(?:30))|(?:(?:0[13578]|1[02])-31))$/,
38
+ // HH:MM:SS
39
+ time : /^(0[0-9]|1[0-9]|2[0-3])(:[0-5][0-9]){2}$/,
40
+ dateISO : /^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}$/,
41
+ // MM/DD/YYYY
42
+ month_day_year : /^(0[1-9]|1[012])[- \/.](0[1-9]|[12][0-9]|3[01])[- \/.]\d{4}$/,
43
+ // DD/MM/YYYY
44
+ day_month_year : /^(0[1-9]|[12][0-9]|3[01])[- \/.](0[1-9]|1[012])[- \/.]\d{4}$/,
45
+
46
+ // #FFF or #FFFFFF
47
+ color : /^#?([a-fA-F0-9]{6}|[a-fA-F0-9]{3})$/
48
+ },
49
+ validators : {
50
+ equalTo : function (el, required, parent) {
51
+ var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
52
+ to = el.value,
53
+ valid = (from === to);
54
+
55
+ return valid;
56
+ }
57
+ }
58
+ },
59
+
60
+ timer : null,
61
+
62
+ init : function (scope, method, options) {
63
+ this.bindings(method, options);
64
+ },
65
+
66
+ events : function (scope) {
67
+ var self = this,
68
+ form = self.S(scope).attr('novalidate', 'novalidate'),
69
+ settings = form.data(this.attr_name(true) + '-init') || {};
70
+
71
+ this.invalid_attr = this.add_namespace('data-invalid');
72
+
73
+ function validate(originalSelf, e) {
74
+ clearTimeout(self.timer);
75
+ self.timer = setTimeout(function () {
76
+ self.validate([originalSelf], e);
77
+ }.bind(originalSelf), settings.timeout);
78
+ }
79
+
80
+
81
+ form
82
+ .off('.abide')
83
+ .on('submit.fndtn.abide', function (e) {
84
+ var is_ajax = /ajax/i.test(self.S(this).attr(self.attr_name()));
85
+ return self.validate(self.S(this).find('input, textarea, select').not(":hidden, [data-abide-ignore]").get(), e, is_ajax);
86
+ })
87
+ .on('validate.fndtn.abide', function (e) {
88
+ if (settings.validate_on === 'manual') {
89
+ self.validate([e.target], e);
90
+ }
91
+ })
92
+ .on('reset', function (e) {
93
+ return self.reset($(this), e);
94
+ })
95
+ .find('input, textarea, select').not(":hidden, [data-abide-ignore]")
96
+ .off('.abide')
97
+ .on('blur.fndtn.abide change.fndtn.abide', function (e) {
98
+ // old settings fallback
99
+ // will be deprecated with F6 release
100
+ if (settings.validate_on_blur && settings.validate_on_blur === true) {
101
+ validate(this, e);
102
+ }
103
+ // new settings combining validate options into one setting
104
+ if (settings.validate_on === 'change') {
105
+ validate(this, e);
106
+ }
107
+ })
108
+ .on('keydown.fndtn.abide', function (e) {
109
+ // old settings fallback
110
+ // will be deprecated with F6 release
111
+ if (settings.live_validate && settings.live_validate === true && e.which != 9) {
112
+ validate(this, e);
113
+ }
114
+ // new settings combining validate options into one setting
115
+ if (settings.validate_on === 'tab' && e.which === 9) {
116
+ validate(this, e);
117
+ }
118
+ else if (settings.validate_on === 'change') {
119
+ validate(this, e);
120
+ }
121
+ })
122
+ .on('focus', function (e) {
123
+ if (navigator.userAgent.match(/iPad|iPhone|Android|BlackBerry|Windows Phone|webOS/i)) {
124
+ $('html, body').animate({
125
+ scrollTop: $(e.target).offset().top
126
+ }, 100);
127
+ }
128
+ });
129
+ },
130
+
131
+ reset : function (form, e) {
132
+ var self = this;
133
+ form.removeAttr(self.invalid_attr);
134
+
135
+ $('[' + self.invalid_attr + ']', form).removeAttr(self.invalid_attr);
136
+ $('.' + self.settings.error_class, form).not('small').removeClass(self.settings.error_class);
137
+ $(':input', form).not(':button, :submit, :reset, :hidden, [data-abide-ignore]').val('').removeAttr(self.invalid_attr);
138
+ },
139
+
140
+ validate : function (els, e, is_ajax) {
141
+ var validations = this.parse_patterns(els),
142
+ validation_count = validations.length,
143
+ form = this.S(els[0]).closest('form'),
144
+ submit_event = /submit/.test(e.type);
145
+
146
+ // Has to count up to make sure the focus gets applied to the top error
147
+ for (var i = 0; i < validation_count; i++) {
148
+ if (!validations[i] && (submit_event || is_ajax)) {
149
+ if (this.settings.focus_on_invalid) {
150
+ els[i].focus();
151
+ }
152
+ form.trigger('invalid.fndtn.abide');
153
+ this.S(els[i]).closest('form').attr(this.invalid_attr, '');
154
+ return false;
155
+ }
156
+ }
157
+
158
+ if (submit_event || is_ajax) {
159
+ form.trigger('valid.fndtn.abide');
160
+ }
161
+
162
+ form.removeAttr(this.invalid_attr);
163
+
164
+ if (is_ajax) {
165
+ return false;
166
+ }
167
+
168
+ return true;
169
+ },
170
+
171
+ parse_patterns : function (els) {
172
+ var i = els.length,
173
+ el_patterns = [];
174
+
175
+ while (i--) {
176
+ el_patterns.push(this.pattern(els[i]));
177
+ }
178
+
179
+ return this.check_validation_and_apply_styles(el_patterns);
180
+ },
181
+
182
+ pattern : function (el) {
183
+ var type = el.getAttribute('type'),
184
+ required = typeof el.getAttribute('required') === 'string';
185
+
186
+ var pattern = el.getAttribute('pattern') || '';
187
+
188
+ if (this.settings.patterns.hasOwnProperty(pattern) && pattern.length > 0) {
189
+ return [el, this.settings.patterns[pattern], required];
190
+ } else if (pattern.length > 0) {
191
+ return [el, new RegExp(pattern), required];
192
+ }
193
+
194
+ if (this.settings.patterns.hasOwnProperty(type)) {
195
+ return [el, this.settings.patterns[type], required];
196
+ }
197
+
198
+ pattern = /.*/;
199
+
200
+ return [el, pattern, required];
201
+ },
202
+
203
+ // TODO: Break this up into smaller methods, getting hard to read.
204
+ check_validation_and_apply_styles : function (el_patterns) {
205
+ var i = el_patterns.length,
206
+ validations = [],
207
+ form = this.S(el_patterns[0][0]).closest('[data-' + this.attr_name(true) + ']'),
208
+ settings = form.data(this.attr_name(true) + '-init') || {};
209
+ while (i--) {
210
+ var el = el_patterns[i][0],
211
+ required = el_patterns[i][2],
212
+ value = el.value.trim(),
213
+ direct_parent = this.S(el).parent(),
214
+ validator = el.getAttribute(this.add_namespace('data-abide-validator')),
215
+ is_radio = el.type === 'radio',
216
+ is_checkbox = el.type === 'checkbox',
217
+ label = this.S('label[for="' + el.getAttribute('id') + '"]'),
218
+ valid_length = (required) ? (el.value.length > 0) : true,
219
+ el_validations = [];
220
+
221
+ var parent, valid;
222
+
223
+ // support old way to do equalTo validations
224
+ if (el.getAttribute(this.add_namespace('data-equalto'))) { validator = 'equalTo' }
225
+
226
+ if (!direct_parent.is('label')) {
227
+ parent = direct_parent;
228
+ } else {
229
+ parent = direct_parent.parent();
230
+ }
231
+
232
+ if (is_radio && required) {
233
+ el_validations.push(this.valid_radio(el, required));
234
+ } else if (is_checkbox && required) {
235
+ el_validations.push(this.valid_checkbox(el, required));
236
+
237
+ } else if (validator) {
238
+ // Validate using each of the specified (space-delimited) validators.
239
+ var validators = validator.split(' ');
240
+ var last_valid = true, all_valid = true;
241
+ for (var iv = 0; iv < validators.length; iv++) {
242
+ valid = this.settings.validators[validators[iv]].apply(this, [el, required, parent])
243
+ el_validations.push(valid);
244
+ all_valid = valid && last_valid;
245
+ last_valid = valid;
246
+ }
247
+ if (all_valid) {
248
+ this.S(el).removeAttr(this.invalid_attr);
249
+ parent.removeClass('error');
250
+ if (label.length > 0 && this.settings.error_labels) {
251
+ label.removeClass(this.settings.error_class).removeAttr('role');
252
+ }
253
+ $(el).triggerHandler('valid');
254
+ } else {
255
+ this.S(el).attr(this.invalid_attr, '');
256
+ parent.addClass('error');
257
+ if (label.length > 0 && this.settings.error_labels) {
258
+ label.addClass(this.settings.error_class).attr('role', 'alert');
259
+ }
260
+ $(el).triggerHandler('invalid');
261
+ }
262
+ } else {
263
+
264
+ if (el_patterns[i][1].test(value) && valid_length ||
265
+ !required && el.value.length < 1 || $(el).attr('disabled')) {
266
+ el_validations.push(true);
267
+ } else {
268
+ el_validations.push(false);
269
+ }
270
+
271
+ el_validations = [el_validations.every(function (valid) {return valid;})];
272
+ if (el_validations[0]) {
273
+ this.S(el).removeAttr(this.invalid_attr);
274
+ el.setAttribute('aria-invalid', 'false');
275
+ el.removeAttribute('aria-describedby');
276
+ parent.removeClass(this.settings.error_class);
277
+ if (label.length > 0 && this.settings.error_labels) {
278
+ label.removeClass(this.settings.error_class).removeAttr('role');
279
+ }
280
+ $(el).triggerHandler('valid');
281
+ } else {
282
+ this.S(el).attr(this.invalid_attr, '');
283
+ el.setAttribute('aria-invalid', 'true');
284
+
285
+ // Try to find the error associated with the input
286
+ var errorElem = parent.find('small.' + this.settings.error_class, 'span.' + this.settings.error_class);
287
+ var errorID = errorElem.length > 0 ? errorElem[0].id : '';
288
+ if (errorID.length > 0) {
289
+ el.setAttribute('aria-describedby', errorID);
290
+ }
291
+
292
+ // el.setAttribute('aria-describedby', $(el).find('.error')[0].id);
293
+ parent.addClass(this.settings.error_class);
294
+ if (label.length > 0 && this.settings.error_labels) {
295
+ label.addClass(this.settings.error_class).attr('role', 'alert');
296
+ }
297
+ $(el).triggerHandler('invalid');
298
+ }
299
+ }
300
+ validations = validations.concat(el_validations);
301
+ }
302
+ return validations;
303
+ },
304
+
305
+ valid_checkbox : function (el, required) {
306
+ var el = this.S(el),
307
+ valid = (el.is(':checked') || !required || el.get(0).getAttribute('disabled'));
308
+
309
+ if (valid) {
310
+ el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
311
+ $(el).triggerHandler('valid');
312
+ } else {
313
+ el.attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
314
+ $(el).triggerHandler('invalid');
315
+ }
316
+
317
+ return valid;
318
+ },
319
+
320
+ valid_radio : function (el, required) {
321
+ var name = el.getAttribute('name'),
322
+ group = this.S(el).closest('[data-' + this.attr_name(true) + ']').find("[name='" + name + "']"),
323
+ count = group.length,
324
+ valid = false,
325
+ disabled = false;
326
+
327
+ // Has to count up to make sure the focus gets applied to the top error
328
+ for (var i=0; i < count; i++) {
329
+ if( group[i].getAttribute('disabled') ){
330
+ disabled=true;
331
+ valid=true;
332
+ } else {
333
+ if (group[i].checked){
334
+ valid = true;
335
+ } else {
336
+ if( disabled ){
337
+ valid = false;
338
+ }
339
+ }
340
+ }
341
+ }
342
+
343
+ // Has to count up to make sure the focus gets applied to the top error
344
+ for (var i = 0; i < count; i++) {
345
+ if (valid) {
346
+ this.S(group[i]).removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
347
+ $(group[i]).triggerHandler('valid');
348
+ } else {
349
+ this.S(group[i]).attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
350
+ $(group[i]).triggerHandler('invalid');
351
+ }
352
+ }
353
+
354
+ return valid;
355
+ },
356
+
357
+ valid_equal : function (el, required, parent) {
358
+ var from = document.getElementById(el.getAttribute(this.add_namespace('data-equalto'))).value,
359
+ to = el.value,
360
+ valid = (from === to);
361
+
362
+ if (valid) {
363
+ this.S(el).removeAttr(this.invalid_attr);
364
+ parent.removeClass(this.settings.error_class);
365
+ if (label.length > 0 && settings.error_labels) {
366
+ label.removeClass(this.settings.error_class);
367
+ }
368
+ } else {
369
+ this.S(el).attr(this.invalid_attr, '');
370
+ parent.addClass(this.settings.error_class);
371
+ if (label.length > 0 && settings.error_labels) {
372
+ label.addClass(this.settings.error_class);
373
+ }
374
+ }
375
+
376
+ return valid;
377
+ },
378
+
379
+ valid_oneof : function (el, required, parent, doNotValidateOthers) {
380
+ var el = this.S(el),
381
+ others = this.S('[' + this.add_namespace('data-oneof') + ']'),
382
+ valid = others.filter(':checked').length > 0;
383
+
384
+ if (valid) {
385
+ el.removeAttr(this.invalid_attr).parent().removeClass(this.settings.error_class);
386
+ } else {
387
+ el.attr(this.invalid_attr, '').parent().addClass(this.settings.error_class);
388
+ }
389
+
390
+ if (!doNotValidateOthers) {
391
+ var _this = this;
392
+ others.each(function () {
393
+ _this.valid_oneof.call(_this, this, null, null, true);
394
+ });
395
+ }
396
+
397
+ return valid;
398
+ },
399
+
400
+ reflow : function(scope, options) {
401
+ var self = this,
402
+ form = self.S('[' + this.attr_name() + ']').attr('novalidate', 'novalidate');
403
+ self.S(form).each(function (idx, el) {
404
+ self.events(el);
405
+ });
406
+ }
407
+ };
408
+ }(jQuery, window, window.document));
@@ -0,0 +1,88 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.accordion = {
5
+ name : 'accordion',
6
+
7
+ version : '5.5.2',
8
+
9
+ settings : {
10
+ content_class : 'content',
11
+ active_class : 'active',
12
+ multi_expand : false,
13
+ toggleable : true,
14
+ callback : function () {}
15
+ },
16
+
17
+ init : function (scope, method, options) {
18
+ this.bindings(method, options);
19
+ },
20
+
21
+ events : function (instance) {
22
+ var self = this;
23
+ var S = this.S;
24
+ self.create(this.S(instance));
25
+
26
+ S(this.scope)
27
+ .off('.fndtn.accordion')
28
+ .on('click.fndtn.accordion', '[' + this.attr_name() + '] > dd > a, [' + this.attr_name() + '] > li > a', function (e) {
29
+ var accordion = S(this).closest('[' + self.attr_name() + ']'),
30
+ groupSelector = self.attr_name() + '=' + accordion.attr(self.attr_name()),
31
+ settings = accordion.data(self.attr_name(true) + '-init') || self.settings,
32
+ target = S('#' + this.href.split('#')[1]),
33
+ aunts = $('> dd, > li', accordion),
34
+ siblings = aunts.children('.' + settings.content_class),
35
+ active_content = siblings.filter('.' + settings.active_class);
36
+
37
+ e.preventDefault();
38
+
39
+ if (accordion.attr(self.attr_name())) {
40
+ siblings = siblings.add('[' + groupSelector + '] dd > ' + '.' + settings.content_class + ', [' + groupSelector + '] li > ' + '.' + settings.content_class);
41
+ aunts = aunts.add('[' + groupSelector + '] dd, [' + groupSelector + '] li');
42
+ }
43
+
44
+ if (settings.toggleable && target.is(active_content)) {
45
+ target.parent('dd, li').toggleClass(settings.active_class, false);
46
+ target.toggleClass(settings.active_class, false);
47
+ S(this).attr('aria-expanded', function(i, attr){
48
+ return attr === 'true' ? 'false' : 'true';
49
+ });
50
+ settings.callback(target);
51
+ target.triggerHandler('toggled', [accordion]);
52
+ accordion.triggerHandler('toggled', [target]);
53
+ return;
54
+ }
55
+
56
+ if (!settings.multi_expand) {
57
+ siblings.removeClass(settings.active_class);
58
+ aunts.removeClass(settings.active_class);
59
+ aunts.children('a').attr('aria-expanded','false');
60
+ }
61
+
62
+ target.addClass(settings.active_class).parent().addClass(settings.active_class);
63
+ settings.callback(target);
64
+ target.triggerHandler('toggled', [accordion]);
65
+ accordion.triggerHandler('toggled', [target]);
66
+ S(this).attr('aria-expanded','true');
67
+ });
68
+ },
69
+
70
+ create: function($instance) {
71
+ var self = this,
72
+ accordion = $instance,
73
+ aunts = $('> .accordion-navigation', accordion),
74
+ settings = accordion.data(self.attr_name(true) + '-init') || self.settings;
75
+
76
+ aunts.children('a').attr('aria-expanded','false');
77
+ aunts.has('.' + settings.content_class + '.' + settings.active_class).children('a').attr('aria-expanded','true');
78
+
79
+ if (settings.multi_expand) {
80
+ $instance.attr('aria-multiselectable','true');
81
+ }
82
+ },
83
+
84
+ off : function () {},
85
+
86
+ reflow : function () {}
87
+ };
88
+ }(jQuery, window, window.document));
@@ -0,0 +1,43 @@
1
+ ;(function ($, window, document, undefined) {
2
+ 'use strict';
3
+
4
+ Foundation.libs.alert = {
5
+ name : 'alert',
6
+
7
+ version : '5.5.2',
8
+
9
+ settings : {
10
+ callback : function () {}
11
+ },
12
+
13
+ init : function (scope, method, options) {
14
+ this.bindings(method, options);
15
+ },
16
+
17
+ events : function () {
18
+ var self = this,
19
+ S = this.S;
20
+
21
+ $(this.scope).off('.alert').on('click.fndtn.alert', '[' + this.attr_name() + '] .close', function (e) {
22
+ var alertBox = S(this).closest('[' + self.attr_name() + ']'),
23
+ settings = alertBox.data(self.attr_name(true) + '-init') || self.settings;
24
+
25
+ e.preventDefault();
26
+ if (Modernizr.csstransitions) {
27
+ alertBox.addClass('alert-close');
28
+ alertBox.on('transitionend webkitTransitionEnd oTransitionEnd', function (e) {
29
+ S(this).trigger('close.fndtn.alert').remove();
30
+ settings.callback();
31
+ });
32
+ } else {
33
+ alertBox.fadeOut(300, function () {
34
+ S(this).trigger('close.fndtn.alert').remove();
35
+ settings.callback();
36
+ });
37
+ }
38
+ });
39
+ },
40
+
41
+ reflow : function () {}
42
+ };
43
+ }(jQuery, window, window.document));