reustyle 2.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (358) hide show
  1. checksums.yaml +7 -0
  2. data/.drone.yml +17 -0
  3. data/.gitignore +25 -0
  4. data/.nvmrc +1 -0
  5. data/.rbenv-gemsets +1 -0
  6. data/.ruby-version +1 -0
  7. data/CONTRIBUTING.md +68 -0
  8. data/Gemfile +4 -0
  9. data/Gruntfile.js +234 -0
  10. data/LICENSE.txt +13 -0
  11. data/README.md +196 -0
  12. data/Rakefile +6 -0
  13. data/bower.json +54 -0
  14. data/config/autoprefixer.yml +6 -0
  15. data/config/scss-lint.yml +55 -0
  16. data/dist/icons.svg +1 -0
  17. data/dist/ustyle-content.css +1 -0
  18. data/dist/ustyle-latest.css +1 -0
  19. data/dist/ustyle.js +567 -0
  20. data/dist/ustyle.json +1 -0
  21. data/dist/ustyle.min.js +1 -0
  22. data/grunt/modules/dss-helper.js +115 -0
  23. data/grunt/modules/file.js +24 -0
  24. data/grunt/modules/html-parser.js +22 -0
  25. data/grunt/modules/templates.js +57 -0
  26. data/grunt/tasks/browser-sync.js +23 -0
  27. data/grunt/tasks/builder.js +67 -0
  28. data/grunt/tasks/styleguide.js +299 -0
  29. data/index.js +37 -0
  30. data/lib/ustyle/deploy.rb +41 -0
  31. data/lib/ustyle/engine.rb +32 -0
  32. data/lib/ustyle/hash.rb +44 -0
  33. data/lib/ustyle/helpers/icon_helper.rb +15 -0
  34. data/lib/ustyle/icons.rb +13 -0
  35. data/lib/ustyle/middleware/icon_middleware.rb +27 -0
  36. data/lib/ustyle/sass_functions.rb +65 -0
  37. data/lib/ustyle/sinatra.rb +34 -0
  38. data/lib/ustyle/sprockets.rb +6 -0
  39. data/lib/ustyle/utils.rb +42 -0
  40. data/lib/ustyle/version.rb +4 -0
  41. data/lib/ustyle.rb +58 -0
  42. data/package-lock.json +9303 -0
  43. data/package.json +89 -0
  44. data/styleguide/CNAME +1 -0
  45. data/styleguide/assets/images/CTAs.png +0 -0
  46. data/styleguide/assets/images/badge-label-usp.png +0 -0
  47. data/styleguide/assets/images/bower-logo.png +0 -0
  48. data/styleguide/assets/images/caveat.png +0 -0
  49. data/styleguide/assets/images/cloudfront-logo.png +0 -0
  50. data/styleguide/assets/images/design-conventions.png +0 -0
  51. data/styleguide/assets/images/error-texts.png +0 -0
  52. data/styleguide/assets/images/external-requirements.png +0 -0
  53. data/styleguide/assets/images/favicon/android-chrome-192x192.png +0 -0
  54. data/styleguide/assets/images/favicon/android-chrome-512x512.png +0 -0
  55. data/styleguide/assets/images/favicon/apple-touch-icon-114x114.png +0 -0
  56. data/styleguide/assets/images/favicon/apple-touch-icon-120x120.png +0 -0
  57. data/styleguide/assets/images/favicon/apple-touch-icon-144x144.png +0 -0
  58. data/styleguide/assets/images/favicon/apple-touch-icon-152x152.png +0 -0
  59. data/styleguide/assets/images/favicon/apple-touch-icon-180x180.png +0 -0
  60. data/styleguide/assets/images/favicon/apple-touch-icon-57x57.png +0 -0
  61. data/styleguide/assets/images/favicon/apple-touch-icon-60x60.png +0 -0
  62. data/styleguide/assets/images/favicon/apple-touch-icon-72x72.png +0 -0
  63. data/styleguide/assets/images/favicon/apple-touch-icon-76x76.png +0 -0
  64. data/styleguide/assets/images/favicon/apple-touch-icon.png +0 -0
  65. data/styleguide/assets/images/favicon/browserconfig.xml +9 -0
  66. data/styleguide/assets/images/favicon/favicon-16x16.png +0 -0
  67. data/styleguide/assets/images/favicon/favicon-32x32.png +0 -0
  68. data/styleguide/assets/images/favicon/favicon.ico +0 -0
  69. data/styleguide/assets/images/favicon/manifest.json +18 -0
  70. data/styleguide/assets/images/favicon/mstile-144x144.png +0 -0
  71. data/styleguide/assets/images/favicon/mstile-150x150.png +0 -0
  72. data/styleguide/assets/images/favicon/mstile-310x150.png +0 -0
  73. data/styleguide/assets/images/favicon/mstile-310x310.png +0 -0
  74. data/styleguide/assets/images/favicon/mstile-70x70.png +0 -0
  75. data/styleguide/assets/images/favicon/safari-pinned-tab.svg +46 -0
  76. data/styleguide/assets/images/icons.svg +1 -0
  77. data/styleguide/assets/images/infographic-01.png +0 -0
  78. data/styleguide/assets/images/infographic-02.png +0 -0
  79. data/styleguide/assets/images/npm-logo.png +0 -0
  80. data/styleguide/assets/images/placeholder-text.png +0 -0
  81. data/styleguide/assets/images/ruby-logo.png +0 -0
  82. data/styleguide/assets/images/site-consistency01.png +0 -0
  83. data/styleguide/assets/images/site-consistency02.png +0 -0
  84. data/styleguide/assets/images/site-consistency03.png +0 -0
  85. data/styleguide/assets/images/styleguide-examples/accurate-housing.jpg +0 -0
  86. data/styleguide/assets/images/styleguide-examples/altered.jpg +0 -0
  87. data/styleguide/assets/images/styleguide-examples/bad-subject.jpg +0 -0
  88. data/styleguide/assets/images/styleguide-examples/centered.jpg +0 -0
  89. data/styleguide/assets/images/styleguide-examples/cliche.jpg +0 -0
  90. data/styleguide/assets/images/styleguide-examples/cold.jpg +0 -0
  91. data/styleguide/assets/images/styleguide-examples/good-subject.jpg +0 -0
  92. data/styleguide/assets/images/styleguide-examples/illustrations_1.png +0 -0
  93. data/styleguide/assets/images/styleguide-examples/illustrations_2.png +0 -0
  94. data/styleguide/assets/images/styleguide-examples/illustrations_3.png +0 -0
  95. data/styleguide/assets/images/styleguide-examples/illustrations_4.png +0 -0
  96. data/styleguide/assets/images/styleguide-examples/illustrations_5.png +0 -0
  97. data/styleguide/assets/images/styleguide-examples/illustrations_6.png +0 -0
  98. data/styleguide/assets/images/styleguide-examples/innaccurate-housing.jpg +0 -0
  99. data/styleguide/assets/images/styleguide-examples/natural-1.jpg +0 -0
  100. data/styleguide/assets/images/styleguide-examples/natural-2.jpg +0 -0
  101. data/styleguide/assets/images/styleguide-examples/natural-3.jpg +0 -0
  102. data/styleguide/assets/images/styleguide-examples/not-centered.jpg +0 -0
  103. data/styleguide/assets/images/styleguide-examples/realistic.jpg +0 -0
  104. data/styleguide/assets/images/styleguide-examples/unaltered.jpg +0 -0
  105. data/styleguide/assets/images/styleguide-examples/unnatural-1.jpg +0 -0
  106. data/styleguide/assets/images/styleguide-examples/unnatural-2.jpg +0 -0
  107. data/styleguide/assets/images/styleguide-examples/unnatural-3.jpg +0 -0
  108. data/styleguide/assets/images/styleguide-examples/warm.jpg +0 -0
  109. data/styleguide/assets/images/tone-framework.png +0 -0
  110. data/styleguide/assets/images/tone.png +0 -0
  111. data/styleguide/assets/images/tooltip.png +0 -0
  112. data/styleguide/assets/images/tsandcs.png +0 -0
  113. data/styleguide/assets/images/ustyle.svg +73 -0
  114. data/styleguide/assets/images/ux-conventions-consistency.png +0 -0
  115. data/styleguide/assets/images/ux-conventions-error.png +0 -0
  116. data/styleguide/assets/images/ux-conventions-errors.png +0 -0
  117. data/styleguide/assets/images/ux-conventions-flexibility.png +0 -0
  118. data/styleguide/assets/images/ux-conventions-freedom.png +0 -0
  119. data/styleguide/assets/images/ux-conventions-minimalist.png +0 -0
  120. data/styleguide/assets/images/ux-conventions-real-world.png +0 -0
  121. data/styleguide/assets/images/ux-conventions-recognition.png +0 -0
  122. data/styleguide/assets/images/ux-conventions-visibility.png +0 -0
  123. data/styleguide/assets/javascripts/app.js +115 -0
  124. data/styleguide/assets/javascripts/modules/stats.js +50 -0
  125. data/styleguide/assets/javascripts/vendor/highlight.js +1 -0
  126. data/styleguide/assets/javascripts/vendor/svg4everybody.js +1 -0
  127. data/styleguide/assets/sass/main.scss +42 -0
  128. data/styleguide/assets/sass/modules/_code.scss +8 -0
  129. data/styleguide/assets/sass/modules/_colours.scss +26 -0
  130. data/styleguide/assets/sass/modules/_copyright.scss +4 -0
  131. data/styleguide/assets/sass/modules/_grid.scss +12 -0
  132. data/styleguide/assets/sass/modules/_home.scss +5 -0
  133. data/styleguide/assets/sass/modules/_images.scss +24 -0
  134. data/styleguide/assets/sass/modules/_links.scss +3 -0
  135. data/styleguide/assets/sass/modules/_logo.scss +182 -0
  136. data/styleguide/assets/sass/modules/_made-at.scss +6 -0
  137. data/styleguide/assets/sass/modules/_markdown.scss +7 -0
  138. data/styleguide/assets/sass/modules/_nav-mobile.scss +72 -0
  139. data/styleguide/assets/sass/modules/_nav.scss +32 -0
  140. data/styleguide/assets/sass/modules/_sidebar.scss +94 -0
  141. data/styleguide/assets/sass/modules/_states.scss +4 -0
  142. data/styleguide/assets/sass/modules/_styleguide.scss +138 -0
  143. data/styleguide/assets/sass/modules/_table.scss +3 -0
  144. data/styleguide/assets/sass/modules/_tooltip.scss +9 -0
  145. data/styleguide/assets/sass/modules/_typography.scss +14 -0
  146. data/styleguide/assets/sass/modules/_version.scss +11 -0
  147. data/styleguide/assets/sass/structure/_base.scss +18 -0
  148. data/styleguide/assets/sass/structure/_header.scss +12 -0
  149. data/styleguide/assets/sass/vendor/_highlight.scss +139 -0
  150. data/styleguide/assets/sass/vendor/_pure-table.scss +75 -0
  151. data/styleguide/content/brand/index.md +47 -0
  152. data/styleguide/content/brand/logo.tpl +279 -0
  153. data/styleguide/content/design/accessibility-testing.md +82 -0
  154. data/styleguide/content/design/index.tpl +367 -0
  155. data/styleguide/content/design/typography.md +68 -0
  156. data/styleguide/content/design/validating-designs.tpl +304 -0
  157. data/styleguide/content/index.tpl +51 -0
  158. data/styleguide/content/language/grammar.md +220 -0
  159. data/styleguide/content/language/microcopy.md +170 -0
  160. data/styleguide/content/language/tone.md +135 -0
  161. data/styleguide/content/pattern-library/grid.tpl +64 -0
  162. data/styleguide/content/pattern-library/index.tpl +88 -0
  163. data/styleguide/partials/_footer.tpl +8 -0
  164. data/styleguide/partials/_head.tpl +26 -0
  165. data/styleguide/partials/_header.tpl +37 -0
  166. data/styleguide/partials/_sidebar.tpl +27 -0
  167. data/styleguide/partials/colour.tpl +24 -0
  168. data/styleguide/partials/icons.tpl +28 -0
  169. data/styleguide/partials/style_block.tpl +44 -0
  170. data/styleguide/templates/simple.tpl +25 -0
  171. data/styleguide/templates/stats.tpl +50 -0
  172. data/styleguide/templates/styleguide.tpl +36 -0
  173. data/tasks/publish.rake +67 -0
  174. data/ustyle.gemspec +32 -0
  175. data/vendor/assets/images/forms/checkbox-rebrand.svg +1 -0
  176. data/vendor/assets/images/forms/checkbox.svg +1 -0
  177. data/vendor/assets/images/icons/alarm.svg +1 -0
  178. data/vendor/assets/images/icons/android.svg +1 -0
  179. data/vendor/assets/images/icons/arrow-circle.svg +1 -0
  180. data/vendor/assets/images/icons/arrow-down.svg +1 -0
  181. data/vendor/assets/images/icons/arrow-up.svg +1 -0
  182. data/vendor/assets/images/icons/book.svg +1 -0
  183. data/vendor/assets/images/icons/bookmark.svg +1 -0
  184. data/vendor/assets/images/icons/breadcrumb.svg +1 -0
  185. data/vendor/assets/images/icons/calculator.svg +1 -0
  186. data/vendor/assets/images/icons/calendar.svg +1 -0
  187. data/vendor/assets/images/icons/car.svg +1 -0
  188. data/vendor/assets/images/icons/checkbox-tick.svg +1 -0
  189. data/vendor/assets/images/icons/chevron-left.svg +1 -0
  190. data/vendor/assets/images/icons/chevron-right.svg +1 -0
  191. data/vendor/assets/images/icons/clock.svg +1 -0
  192. data/vendor/assets/images/icons/close.svg +1 -0
  193. data/vendor/assets/images/icons/cog.svg +1 -0
  194. data/vendor/assets/images/icons/controller.svg +1 -0
  195. data/vendor/assets/images/icons/credit-card.svg +1 -0
  196. data/vendor/assets/images/icons/cross.svg +1 -0
  197. data/vendor/assets/images/icons/dashcam.svg +1 -0
  198. data/vendor/assets/images/icons/dual-fuel.svg +1 -0
  199. data/vendor/assets/images/icons/electric-light.svg +1 -0
  200. data/vendor/assets/images/icons/envelope.svg +1 -0
  201. data/vendor/assets/images/icons/exit-noexit.svg +1 -0
  202. data/vendor/assets/images/icons/facebook-brand.svg +1 -0
  203. data/vendor/assets/images/icons/facebook.svg +1 -0
  204. data/vendor/assets/images/icons/filter.svg +1 -0
  205. data/vendor/assets/images/icons/fixed-variable.svg +1 -0
  206. data/vendor/assets/images/icons/gas.svg +1 -0
  207. data/vendor/assets/images/icons/gauge.svg +1 -0
  208. data/vendor/assets/images/icons/github.svg +1 -0
  209. data/vendor/assets/images/icons/google-brand.svg +1 -0
  210. data/vendor/assets/images/icons/google.svg +1 -0
  211. data/vendor/assets/images/icons/graph-up.svg +1 -0
  212. data/vendor/assets/images/icons/home.svg +1 -0
  213. data/vendor/assets/images/icons/hot.svg +1 -0
  214. data/vendor/assets/images/icons/info.svg +1 -0
  215. data/vendor/assets/images/icons/kettle.svg +1 -0
  216. data/vendor/assets/images/icons/key.svg +1 -0
  217. data/vendor/assets/images/icons/lock.svg +1 -0
  218. data/vendor/assets/images/icons/magnify-in.svg +1 -0
  219. data/vendor/assets/images/icons/magnify.svg +1 -0
  220. data/vendor/assets/images/icons/menu.svg +1 -0
  221. data/vendor/assets/images/icons/message.svg +1 -0
  222. data/vendor/assets/images/icons/mobile.svg +1 -0
  223. data/vendor/assets/images/icons/monthly-dd.svg +1 -0
  224. data/vendor/assets/images/icons/network.svg +1 -0
  225. data/vendor/assets/images/icons/no-exit.svg +1 -0
  226. data/vendor/assets/images/icons/pdf.svg +1 -0
  227. data/vendor/assets/images/icons/pencil.svg +1 -0
  228. data/vendor/assets/images/icons/person-add.svg +1 -0
  229. data/vendor/assets/images/icons/person.svg +1 -0
  230. data/vendor/assets/images/icons/phone.svg +1 -0
  231. data/vendor/assets/images/icons/piggy-bank.svg +1 -0
  232. data/vendor/assets/images/icons/pin.svg +1 -0
  233. data/vendor/assets/images/icons/play.svg +1 -0
  234. data/vendor/assets/images/icons/pound-circle.svg +1 -0
  235. data/vendor/assets/images/icons/pound-note.svg +1 -0
  236. data/vendor/assets/images/icons/present.svg +1 -0
  237. data/vendor/assets/images/icons/print.svg +1 -0
  238. data/vendor/assets/images/icons/quarterly-dd.svg +1 -0
  239. data/vendor/assets/images/icons/question-circle.svg +1 -0
  240. data/vendor/assets/images/icons/quote.svg +1 -0
  241. data/vendor/assets/images/icons/recycle.svg +1 -0
  242. data/vendor/assets/images/icons/remove.svg +1 -0
  243. data/vendor/assets/images/icons/renewable.svg +1 -0
  244. data/vendor/assets/images/icons/results.svg +1 -0
  245. data/vendor/assets/images/icons/save.svg +1 -0
  246. data/vendor/assets/images/icons/share.svg +1 -0
  247. data/vendor/assets/images/icons/shield.svg +1 -0
  248. data/vendor/assets/images/icons/sim.svg +1 -0
  249. data/vendor/assets/images/icons/smiley.svg +1 -0
  250. data/vendor/assets/images/icons/sort.svg +1 -0
  251. data/vendor/assets/images/icons/speech-circle.svg +1 -0
  252. data/vendor/assets/images/icons/speech.svg +1 -0
  253. data/vendor/assets/images/icons/spinner-rebrand.svg +1 -0
  254. data/vendor/assets/images/icons/spinner.svg +1 -0
  255. data/vendor/assets/images/icons/star-half.svg +1 -0
  256. data/vendor/assets/images/icons/star.svg +1 -0
  257. data/vendor/assets/images/icons/starline-half.svg +1 -0
  258. data/vendor/assets/images/icons/starline.svg +1 -0
  259. data/vendor/assets/images/icons/talk.svg +1 -0
  260. data/vendor/assets/images/icons/tick-circle.svg +1 -0
  261. data/vendor/assets/images/icons/tick.svg +1 -0
  262. data/vendor/assets/images/icons/tv.svg +1 -0
  263. data/vendor/assets/images/icons/twitter-brand.svg +1 -0
  264. data/vendor/assets/images/icons/twitter.svg +1 -0
  265. data/vendor/assets/images/icons/ustyle.svg +1 -0
  266. data/vendor/assets/images/icons/uswitch.svg +1 -0
  267. data/vendor/assets/images/icons/variable.svg +1 -0
  268. data/vendor/assets/images/icons/warning-circle.svg +1 -0
  269. data/vendor/assets/images/icons/warning.svg +1 -0
  270. data/vendor/assets/images/icons/wifi.svg +1 -0
  271. data/vendor/assets/images/icons/wiki.svg +1 -0
  272. data/vendor/assets/images/icons/xml.svg +1 -0
  273. data/vendor/assets/images/icons.svg +1 -0
  274. data/vendor/assets/javascripts/ustyle/backdrop.js +56 -0
  275. data/vendor/assets/javascripts/ustyle/classtoggler.js +76 -0
  276. data/vendor/assets/javascripts/ustyle/overlay.js +152 -0
  277. data/vendor/assets/javascripts/ustyle/tabs.js +166 -0
  278. data/vendor/assets/javascripts/ustyle/utils.js +113 -0
  279. data/vendor/assets/javascripts/ustyle.js +4 -0
  280. data/vendor/assets/stylesheets/rebrand-content.scss +1 -0
  281. data/vendor/assets/stylesheets/rebrand.scss +1 -0
  282. data/vendor/assets/stylesheets/ustyle/_all.scss +55 -0
  283. data/vendor/assets/stylesheets/ustyle/_content.scss +5 -0
  284. data/vendor/assets/stylesheets/ustyle/_global.scss +20 -0
  285. data/vendor/assets/stylesheets/ustyle/articles/_base.scss +100 -0
  286. data/vendor/assets/stylesheets/ustyle/articles/_guide.scss +57 -0
  287. data/vendor/assets/stylesheets/ustyle/articles/_more.scss +31 -0
  288. data/vendor/assets/stylesheets/ustyle/articles/_news.scss +213 -0
  289. data/vendor/assets/stylesheets/ustyle/articles/_related.scss +76 -0
  290. data/vendor/assets/stylesheets/ustyle/basics/_extends.scss +73 -0
  291. data/vendor/assets/stylesheets/ustyle/basics/_fonts.scss +27 -0
  292. data/vendor/assets/stylesheets/ustyle/basics/_functions.scss +78 -0
  293. data/vendor/assets/stylesheets/ustyle/basics/_grid.scss +86 -0
  294. data/vendor/assets/stylesheets/ustyle/basics/_typography.scss +123 -0
  295. data/vendor/assets/stylesheets/ustyle/basics/_variables.scss +166 -0
  296. data/vendor/assets/stylesheets/ustyle/basics/variables/_colors.scss +94 -0
  297. data/vendor/assets/stylesheets/ustyle/basics/variables/_forms.scss +98 -0
  298. data/vendor/assets/stylesheets/ustyle/basics/variables/_icons.scss +43 -0
  299. data/vendor/assets/stylesheets/ustyle/components/_backdrop.scss +23 -0
  300. data/vendor/assets/stylesheets/ustyle/components/_breadcrumbs.scss +66 -0
  301. data/vendor/assets/stylesheets/ustyle/components/_button.scss +187 -0
  302. data/vendor/assets/stylesheets/ustyle/components/_calculator.scss +41 -0
  303. data/vendor/assets/stylesheets/ustyle/components/_comp-table-row.scss +341 -0
  304. data/vendor/assets/stylesheets/ustyle/components/_compliance-banner.scss +38 -0
  305. data/vendor/assets/stylesheets/ustyle/components/_content-group.scss +33 -0
  306. data/vendor/assets/stylesheets/ustyle/components/_cta.scss +66 -0
  307. data/vendor/assets/stylesheets/ustyle/components/_grid-classes.scss +52 -0
  308. data/vendor/assets/stylesheets/ustyle/components/_hero.scss +115 -0
  309. data/vendor/assets/stylesheets/ustyle/components/_links.scss +26 -0
  310. data/vendor/assets/stylesheets/ustyle/components/_lists-li.scss +92 -0
  311. data/vendor/assets/stylesheets/ustyle/components/_lists.scss +39 -0
  312. data/vendor/assets/stylesheets/ustyle/components/_loader.scss +139 -0
  313. data/vendor/assets/stylesheets/ustyle/components/_overlay.scss +183 -0
  314. data/vendor/assets/stylesheets/ustyle/components/_progress.scss +138 -0
  315. data/vendor/assets/stylesheets/ustyle/components/_promo-banner.scss +131 -0
  316. data/vendor/assets/stylesheets/ustyle/components/_reminder.scss +87 -0
  317. data/vendor/assets/stylesheets/ustyle/components/_tab-navigation.scss +114 -0
  318. data/vendor/assets/stylesheets/ustyle/components/_table-toolbar.scss +91 -0
  319. data/vendor/assets/stylesheets/ustyle/components/_tabs.scss +300 -0
  320. data/vendor/assets/stylesheets/ustyle/components/_tooltip.scss +243 -0
  321. data/vendor/assets/stylesheets/ustyle/components/_usp.scss +88 -0
  322. data/vendor/assets/stylesheets/ustyle/content/_base.scss +227 -0
  323. data/vendor/assets/stylesheets/ustyle/content/_c-header.scss +27 -0
  324. data/vendor/assets/stylesheets/ustyle/content/_c-social.scss +9 -0
  325. data/vendor/assets/stylesheets/ustyle/content/_c-tabs.scss +30 -0
  326. data/vendor/assets/stylesheets/ustyle/forms/_base.scss +9 -0
  327. data/vendor/assets/stylesheets/ustyle/forms/_fields.scss +78 -0
  328. data/vendor/assets/stylesheets/ustyle/forms/_input-group.scss +154 -0
  329. data/vendor/assets/stylesheets/ustyle/forms/_input.scss +61 -0
  330. data/vendor/assets/stylesheets/ustyle/forms/_radio-checkbox.scss +144 -0
  331. data/vendor/assets/stylesheets/ustyle/forms/_reset.scss +21 -0
  332. data/vendor/assets/stylesheets/ustyle/forms/_select.scss +154 -0
  333. data/vendor/assets/stylesheets/ustyle/forms/_textarea.scss +33 -0
  334. data/vendor/assets/stylesheets/ustyle/forms/_toggle.scss +114 -0
  335. data/vendor/assets/stylesheets/ustyle/forms/_validation.scss +104 -0
  336. data/vendor/assets/stylesheets/ustyle/icons/_base.scss +241 -0
  337. data/vendor/assets/stylesheets/ustyle/mixins/_arrow.scss +51 -0
  338. data/vendor/assets/stylesheets/ustyle/mixins/_base.scss +7 -0
  339. data/vendor/assets/stylesheets/ustyle/mixins/_baseline.scss +43 -0
  340. data/vendor/assets/stylesheets/ustyle/mixins/_forms.scss +84 -0
  341. data/vendor/assets/stylesheets/ustyle/mixins/_general.scss +24 -0
  342. data/vendor/assets/stylesheets/ustyle/mixins/_link-colors.scss +44 -0
  343. data/vendor/assets/stylesheets/ustyle/mixins/_media-query.scss +121 -0
  344. data/vendor/assets/stylesheets/ustyle/mixins/_typography.scss +98 -0
  345. data/vendor/assets/stylesheets/ustyle/tables/_base.scss +4 -0
  346. data/vendor/assets/stylesheets/ustyle/tables/_tables-basic.scss +72 -0
  347. data/vendor/assets/stylesheets/ustyle/tables/_tables-sortable.scss +72 -0
  348. data/vendor/assets/stylesheets/ustyle/tables/_tables-with-key-cells.scss +18 -0
  349. data/vendor/assets/stylesheets/ustyle/tables/_variables.scss +15 -0
  350. data/vendor/assets/stylesheets/ustyle/utilities/_general.scss +116 -0
  351. data/vendor/assets/stylesheets/ustyle/utilities/_grid.scss +13 -0
  352. data/vendor/assets/stylesheets/ustyle/utilities/_images.scss +34 -0
  353. data/vendor/assets/stylesheets/ustyle/utilities/_responsive.scss +101 -0
  354. data/vendor/assets/stylesheets/ustyle/utilities/_spacing.scss +73 -0
  355. data/vendor/assets/stylesheets/ustyle/vendor/normalize.scss +427 -0
  356. data/vendor/assets/stylesheets/ustyle-content.scss +2 -0
  357. data/vendor/assets/stylesheets/ustyle.scss +1 -0
  358. metadata +517 -0
@@ -0,0 +1,98 @@
1
+ ////
2
+ //// @group typography
3
+ ////
4
+
5
+ /// Returns the `$normal-font` declaration either as an extend or re-declares
6
+ ///
7
+ /// @param {Bool} $extend [true]
8
+ /// If set to `false` will redeclare the `$normal-font` family
9
+
10
+ @mixin normal-font($extend: true) {
11
+ @if $extend {
12
+ @extend %normal-font;
13
+ } @else {
14
+ font-family: $normal-font;
15
+ }
16
+ }
17
+
18
+ /// Returns the `$heading-font` declaration either as an extend or re-declares
19
+ ///
20
+ /// @param {Bool} $extend [true]
21
+ /// If set to `false` will redeclare the `$heading-font` family
22
+
23
+ @mixin heading-font($extend: true) {
24
+ @if $extend {
25
+ @extend %heading-font;
26
+ } @else {
27
+ font: {
28
+ family: $heading-font;
29
+ weight: 700;
30
+ };
31
+ }
32
+ }
33
+
34
+ /// Returns the `$heading-font-primary` declaration either as an extend or re-declares
35
+ ///
36
+ /// @deprecated Use `heading-font` instead
37
+ /// @alias heading-font
38
+ /// @param {Bool} $extend [true]
39
+ /// If set to `false` will redeclare the `$heading-font-primary` family
40
+
41
+ @mixin heading-font-primary($extend: true) {
42
+ @include heading-font($extend);
43
+ }
44
+
45
+ /// Returns the `$heading-font-secondary` declaration either as an extend or re-declares
46
+ ///
47
+ /// @deprecated Use `heading-font` instead
48
+ /// @alias heading-font
49
+ /// @param {Bool} $extend [true]
50
+ /// If set to `false` will redeclare the `$heading-font-secondary` family
51
+
52
+ @mixin heading-font-secondary($extend: true) {
53
+ @include heading-font($extend);
54
+ }
55
+
56
+ /// Returns the `$heading-font-secondary` declaration either as an extend or re-declares
57
+ ///
58
+ /// @alias heading-font-secondary
59
+
60
+ @mixin bold-font($extend: true) {
61
+ @include heading-font($extend);
62
+ }
63
+
64
+ /// Returns the `$normal-font` declaration in italic either as an extend or re-declares
65
+ ///
66
+ /// @param {Bool} $extend [true]
67
+ /// If set to `false` will redeclare the `$normal-font` family and set the font to italic
68
+
69
+ @mixin italic-font($extend: true) {
70
+ @if $extend {
71
+ @extend %italic-font;
72
+ } @else {
73
+ font: {
74
+ family: $normal-font;
75
+ style: italic;
76
+ };
77
+ }
78
+ }
79
+
80
+ /// Builds the heading font size with pre-defined sizes and line-heights from `$heading-font-sizes`
81
+ /// and `$heading-line-heights` respecively
82
+ ///
83
+ /// @param {Number (unitless)} $level
84
+ /// Set a heading level between 1-6
85
+ ///
86
+ /// @param {Bool} $heading-font [true]
87
+ /// DEPRECATED
88
+ ///
89
+ /// @param {Bool} $extend [true]
90
+ /// If set to `false` will redeclare the font-family settings
91
+
92
+ @mixin heading($level, $heading-font: true, $extend: true, $font-sizes: $heading-font-sizes, $line-heights: $heading-line-heights) {
93
+ $font-size: nth($font-sizes, $level);
94
+ $line-height: nth($line-heights, $level);
95
+ @include heading-font($extend);
96
+ font-size: em($font-size);
97
+ line-height: $line-height + em;
98
+ }
@@ -0,0 +1,4 @@
1
+ @import "ustyle/tables/variables";
2
+ @import "ustyle/tables/tables-basic";
3
+ @import "ustyle/tables/tables-sortable";
4
+ @import "ustyle/tables/tables-with-key-cells";
@@ -0,0 +1,72 @@
1
+ // Basic table
2
+ // ---
3
+ // The most basic comparison table structure. It defines the style of the the
4
+ // table only, the look of the content is totally up to you. On small screens
5
+ // the table components become block elements, with only minimal styles applied,
6
+ // so you don't need to overwrite too many default style rules when customising
7
+ // the mobile appearance.
8
+
9
+ %table--base {
10
+ width: 100%;
11
+ color: $table-c-text;
12
+ }
13
+
14
+ .us-table {
15
+ @extend %table--base;
16
+ border-collapse: separate;
17
+ border-spacing: 0;
18
+
19
+ @include respond-to(mobile) {
20
+ thead {
21
+ display: none;
22
+ }
23
+ // !! This affects tables inside the table
24
+ tbody,
25
+ tr,
26
+ td {
27
+ display: block;
28
+ }
29
+ }
30
+ }
31
+
32
+ // Normal table headers
33
+ %table-head--base {
34
+ padding: 0 1em .5em 0;
35
+ }
36
+
37
+ .us-table-head {
38
+ @extend %table-head--base;
39
+ color: $table-c-head-text;
40
+ text-align: left;
41
+ vertical-align: middle;
42
+ border-bottom: 1px solid $table-c-border;
43
+ }
44
+
45
+ // Main rows
46
+ %table-body-row--base {
47
+ @include respond-to(mobile) {
48
+ @include clearfix;
49
+ position: relative;
50
+ }
51
+ }
52
+
53
+ .us-table-body-row {
54
+ @extend %table-body-row--base;
55
+ }
56
+
57
+ %table-cell--base {
58
+ padding-top: $gutter-width / 2;
59
+ padding-bottom: $gutter-width / 2;
60
+ }
61
+
62
+ .us-table-cell {
63
+ @extend %table-cell--base;
64
+ text-align: left;
65
+ vertical-align: top;
66
+ border-bottom: 1px solid $table-c-border;
67
+
68
+ @include respond-to(mobile) {
69
+ padding: 0;
70
+ border: 0;
71
+ }
72
+ }
@@ -0,0 +1,72 @@
1
+ // Example of a more complex table
2
+ // ---
3
+
4
+ @if $table-experimental {
5
+ %with-sort-arrow {
6
+ @include respond-to(small-tablet, true) {
7
+ position: relative;
8
+ margin-right: .4em;
9
+
10
+ &:after {
11
+ position: absolute;
12
+ top: 50%;
13
+ right: -1.2em;
14
+ display: none;
15
+ margin-top: -.4em;
16
+ line-height: 1;
17
+ color: $table-c-inactive;
18
+ content: "\025bc";
19
+ }
20
+ }
21
+ }
22
+
23
+ .us-table-cell-sorted {
24
+ @include respond-to(small-tablet, true) {
25
+ background: $table-c-sorted-bg;
26
+ }
27
+ }
28
+
29
+ %us-table-head-text,
30
+ .us-table-head-text {
31
+ @extend %with-sort-arrow;
32
+ display: inline-block;
33
+ line-height: normal;
34
+ vertical-align: baseline;
35
+ }
36
+
37
+ .us-table-sort-button,
38
+ .us-table-sort-button:visited {
39
+ @extend %us-table-head-text;
40
+
41
+ @include respond-to(small-tablet, true) {
42
+ color: $table-c-head-text;
43
+ cursor: default;
44
+
45
+ .js .js-sortable & {
46
+ cursor: pointer;
47
+
48
+ &:after {
49
+ display: block;
50
+ }
51
+
52
+ &:hover {
53
+ color: $table-c-head-text;
54
+ }
55
+
56
+ &:hover:after {
57
+ color: $table-c-head-text;
58
+ }
59
+ }
60
+ }
61
+ }
62
+
63
+ .us-table-head-sorted {
64
+ .us-table-sort-button,
65
+ .us-table-head-text {
66
+ &:after {
67
+ display: block;
68
+ color: $table-c-head-text;
69
+ }
70
+ }
71
+ }
72
+ }
@@ -0,0 +1,18 @@
1
+ // Table with key cells
2
+ // --------------------
3
+
4
+ @if $table-experimental {
5
+ .us-table-cell-key {
6
+ @include respond-to(small-tablet, true) {
7
+ width: em($table-key-width);
8
+ max-width: em($table-key-width);
9
+ padding-right: em($table-key-sidepadding);
10
+ padding-left: em($table-key-sidepadding);
11
+ }
12
+
13
+ .key-value,
14
+ .key-sideunit {
15
+ color: $table-c-key;
16
+ }
17
+ }
18
+ }
@@ -0,0 +1,15 @@
1
+ $table-experimental: false !default;
2
+
3
+ $table-font-size: 14px !default;
4
+
5
+ $table-c-text: tint($c-typegrey, 25%) !default;
6
+ $table-c-border: tint($c-typegrey, 75%) !default;
7
+ $table-c-head-text: $c-navy !default;
8
+ $table-c-head-bg: #fff !default;
9
+ $table-c-body-bg: #fff !default;
10
+ $table-c-key: $c-navy !default;
11
+ $table-c-sorted-bg: tint($c-cyan, 75%) !default;
12
+ $table-c-inactive: tint($c-typegrey, 75%) !default;
13
+
14
+ $table-key-width: 150px !default;
15
+ $table-key-sidepadding: 10px !default;
@@ -0,0 +1,116 @@
1
+ // @page Pattern Library/Utilities
2
+ // @name General
3
+ //
4
+ // @description
5
+ // These utility classes allow for some basic CSS properties to be applied across elements. The classname applies to the property that is getting set, with the value as the modifier.
6
+ //
7
+ // @state .us-clearfix - Clear floats.
8
+ // @state .us-float--left - Float element to the left.
9
+ // @state .us-float--right - Float element to the right.
10
+ // @state .us-align--left - Align content of the element to the left.
11
+ // @state .us-align--center - Align content of the element to the center.
12
+ // @state .us-align--right - Align content of the element to the right.
13
+ // @state .us-block - Display element as a block.
14
+ // @state .us-color--cyan - Change content color to blue, navy, typecyan, cyan, red, green.
15
+ // @state .us-list--reset - Reset list style.
16
+ //
17
+ // @markup
18
+ // <div class='{$modifiers}'>
19
+ // <p>content</p>
20
+ // </div>
21
+
22
+
23
+ // Clear floats
24
+ .us-clearfix {
25
+ @extend %clearfix;
26
+ }
27
+
28
+ // Reset list styling
29
+ .us-list--reset {
30
+ @extend %reset-box-model;
31
+ list-style: none;
32
+ }
33
+
34
+ // Blocked element
35
+ .us-blocked {
36
+ display: block;
37
+ }
38
+
39
+ // Margins
40
+ .us-trailered {
41
+ margin-bottom: 1em;
42
+ }
43
+
44
+ .us-trailered--large {
45
+ margin-bottom: 1.5em;
46
+ }
47
+
48
+ .us-trailered--small {
49
+ margin-bottom: .5em;
50
+ }
51
+
52
+ // Floats
53
+ .us-float--left {
54
+ @extend %float-left;
55
+ }
56
+
57
+ .us-float--right {
58
+ @extend %float-right;
59
+ }
60
+
61
+ .us-align--left {
62
+ text-align: left;
63
+ }
64
+
65
+ .us-align--right {
66
+ text-align: right;
67
+ }
68
+
69
+ .us-align--center {
70
+ text-align: center;
71
+ }
72
+
73
+ // Colors
74
+ $colors: (
75
+ "blue" $c-blue,
76
+ "navy" $c-navy,
77
+ "typecyan" $c-typecyan,
78
+ "cyan" $c-cyan,
79
+ "red" $c-red,
80
+ "green" $c-green,
81
+ "typegrey" $c-typegrey,
82
+ "typegrey-2" $c-typegrey-2,
83
+ "inputgrey" $c-inputgrey,
84
+ "bordergrey" $c-bordergrey,
85
+ "keylinegrey" $c-keylinegrey,
86
+ "blue-light" $c-blue-light,
87
+ "typecyan-light" $c-typecyan-light,
88
+ "cyan-light" $c-cyan-light,
89
+ "yellow" $c-yellow,
90
+ "orange" $c-orange,
91
+ "purple" $c-purple
92
+ );
93
+
94
+ @each $color in $colors {
95
+ .us-color--#{nth($color, 1)} {
96
+ color: nth($color, 2);
97
+ }
98
+
99
+ .us-background-color--#{nth($color, 1)} {
100
+ background: nth($color, 2);
101
+ }
102
+ }
103
+
104
+ // Fonts
105
+
106
+ .us-font--normal {
107
+ @include normal-font;
108
+ }
109
+
110
+ .us-font--heading-p {
111
+ @include heading-font;
112
+ }
113
+
114
+ .us-font--heading-s {
115
+ @include heading-font;
116
+ }
@@ -0,0 +1,13 @@
1
+ @for $i from 1 through 4 {
2
+ .us-grid-md--push-#{$i} {
3
+ @include respond-to($default-grid-breakpoint, true) {
4
+ padding-left: col-width($i);
5
+ }
6
+ }
7
+
8
+ .us-grid-lg--push-#{$i} {
9
+ @include respond-to(desktop, true) {
10
+ padding-left: col-width($i);
11
+ }
12
+ }
13
+ }
@@ -0,0 +1,34 @@
1
+ // @page Pattern Library/Utilities
2
+ // @name Images
3
+ //
4
+ // @description
5
+ // Helpful image classes for making images full width or floating within content.
6
+ //
7
+ // @state .us-img--full - Full width image.
8
+ // @state .us-img--left - Left floated image.
9
+ // @state .us-img--right - Right floated image.
10
+ //
11
+ // @markup
12
+ // <p>
13
+ // <img class="{$modifiers}" src="https://assets0.uswitch.com/s3/uswitch-wp-cms-assets/money/guides/wp-content/uploads/2014/11/DB2011AU01018_SMALL.jpg" width="400">
14
+ // Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas mattis sit amet magna porta mollis. Pellentesque id pretium quam. Proin nec blandit ligula. Sed lectus orci, mattis ac hendrerit at, ultrices eget metus. Vestibulum dignissim venenatis malesuada. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Praesent eget convallis urna, at ultrices ligula. Donec bibendum, lectus at consequat feugiat, nisi leo tincidunt purus, et condimentum lorem diam scelerisque neque. Nam imperdiet aliquet arcu a rhoncus.
15
+ // </p>
16
+
17
+ .us-img--full {
18
+ display: block;
19
+ height: auto;
20
+ max-width: 100%;
21
+ min-width: 100%;
22
+ }
23
+
24
+ .us-img--left {
25
+ @extend %float-left;
26
+ margin-right: 1em;
27
+ margin-bottom: 1em;
28
+ }
29
+
30
+ .us-img--right {
31
+ @extend %float-right;
32
+ margin-bottom: 1em;
33
+ margin-left: 1em;
34
+ }
@@ -0,0 +1,101 @@
1
+ // @page Pattern Library/Utilities
2
+ // @name Responsive
3
+ //
4
+ // @description
5
+ // Responsive classes to allow display of elements across devices. You have the option of displaying them as `block`, `inline-block` or `inline` elements.
6
+ // You can also hide elements by `.us-{DEVICE}--hidden` and will hide those elements above that breakpoint.
7
+ //
8
+ // @markup
9
+ // <div class='us-lg-desktop--block'><strong>.us-lg-desktop--block</strong> Shows on large desktop and up</div>
10
+ // <div class='us-desktop--block'><strong>.us-desktop--block</strong> Shows on desktop and up</div>
11
+ // <div class='us-tablet--block'><strong>.us-tablet--block</strong> Shows on tablet and up</div>
12
+ // <div class='us-sm-tablet--block'><strong>.us-sm-tablet--block</strong> Shows on small tablet and up</div>
13
+ // <div class='us-mobile--block'><strong>.us-mobile--block</strong> Shows on mobile only</div>
14
+ // <div class='us-tablet--hidden'><strong>.us-tablet--hidden</strong> Hidden on tablet and up</div>
15
+
16
+ $display-properties: block, inline-block, inline;
17
+
18
+ // Mobile
19
+ .us-mobile--hidden {
20
+ @include respond-to(mobile) {
21
+ display: none;
22
+ }
23
+ }
24
+
25
+ @each $property in $display-properties {
26
+ .us-mobile--#{$property} {
27
+ display: none;
28
+
29
+ @include respond-to(mobile) {
30
+ display: $property;
31
+ }
32
+ }
33
+ }
34
+
35
+ // Small tablet
36
+ .us-sm-tablet--hidden {
37
+ @include respond-to(small-tablet, true) {
38
+ display: none;
39
+ }
40
+ }
41
+
42
+ @each $property in $display-properties {
43
+ .us-sm-tablet--#{$property} {
44
+ display: none;
45
+
46
+ @include respond-to(small-tablet, true) {
47
+ display: $property;
48
+ }
49
+ }
50
+ }
51
+
52
+ // Tablet
53
+ .us-tablet--hidden {
54
+ @include respond-to(tablet, true) {
55
+ display: none;
56
+ }
57
+ }
58
+
59
+ @each $property in $display-properties {
60
+ .us-tablet--#{$property} {
61
+ display: none;
62
+
63
+ @include respond-to(tablet, true) {
64
+ display: $property;
65
+ }
66
+ }
67
+ }
68
+
69
+ // Desktop
70
+ .us-desktop--hidden {
71
+ @include respond-to(desktop, true) {
72
+ display: none;
73
+ }
74
+ }
75
+
76
+ @each $property in $display-properties {
77
+ .us-desktop--#{$property} {
78
+ display: none;
79
+
80
+ @include respond-to(desktop, true) {
81
+ display: $property;
82
+ }
83
+ }
84
+ }
85
+
86
+ // Large desktop
87
+ .us-lg-desktop--hidden {
88
+ @include respond-to(large-desktop) {
89
+ display: none;
90
+ }
91
+ }
92
+
93
+ @each $property in $display-properties {
94
+ .us-lg-desktop--#{$property} {
95
+ display: none;
96
+
97
+ @include respond-to(large-desktop) {
98
+ display: $property;
99
+ }
100
+ }
101
+ }
@@ -0,0 +1,73 @@
1
+ // @page Pattern Library/Utilities
2
+ // @name Spacing
3
+ //
4
+ // @description
5
+ // Allow control of spacing around an element. You can set margin or padding for an element without creating an extra class.
6
+ // An example of this `.us-margin-top`, `.us-margin-top--small`, `.us-margin-top--large` where `margin` can be replaced by `padding` and `top` can be replaced by `bottom`, `left` or `right`.
7
+ // Default space for margin and padding is 1em, `small` modifier uses .5em and `large` modifier uses 1.5em.
8
+ //
9
+ // @state .us-margin-top - Use default top margin (1em).
10
+ // @state .us-margin-top--small - Use small top margin (.5em).
11
+ // @state .us-margin-top--large - Use large top margin (1.5em).
12
+ // @state .us-margin-bottom - Use default bottom margin (1em).
13
+ // @state .us-margin-bottom--small - Use small bottom margin (.5em).
14
+ // @state .us-margin-bottom--large - Use large bottom margin (1.5em).
15
+ // @state .us-margin-left - Use default left margin (1em).
16
+ // @state .us-margin-left--small - Use small left margin (.5em).
17
+ // @state .us-margin-left--large - Use large left margin (1.5em).
18
+ // @state .us-margin-right - Use default right margin (1em).
19
+ // @state .us-margin-right--small - Use small right margin (.5em).
20
+ // @state .us-margin-right--large - Use large right margin (1.5em).
21
+ // @state .us-padding-top - Use default top padding (1em).
22
+ // @state .us-padding-top--small - Use small top padding (.5em).
23
+ // @state .us-padding-top--large - Use large top padding (1.5em).
24
+ // @state .us-padding-bottom - Use default bottom padding (1em).
25
+ // @state .us-padding-bottom--small - Use small bottom padding (.5em).
26
+ // @state .us-padding-bottom--large - Use large bottom padding (1.5em).
27
+ // @state .us-padding-left - Use default left padding (1em).
28
+ // @state .us-padding-left--small - Use small left padding (.5em).
29
+ // @state .us-padding-left--large - Use large left padding (1.5em).
30
+ // @state .us-padding-right - Use default right padding (1em).
31
+ // @state .us-padding-right--small - Use small right padding (.5em).
32
+ // @state .us-padding-right--large - Use large right padding (1.5em).
33
+ // @state .us-reset--padding - Reset padding to 0.
34
+ // @state .us-reset--margin - Reset margin to 0.
35
+ // @state .us-reset - Reset padding and margin to 0.
36
+ //
37
+ // @markup
38
+ // <div class='class-goes-here {$modifiers}'>Sample content</div>
39
+
40
+ $positions: "top", "right", "bottom", "left";
41
+ $spacing: "small" .5em, "large" 1.5em;
42
+
43
+ .us-reset--padding {
44
+ padding: 0;
45
+ }
46
+
47
+ .us-reset--margin {
48
+ margin: 0;
49
+ }
50
+
51
+ .us-reset {
52
+ @extend %reset-box-model;
53
+ }
54
+
55
+ @each $position in $positions {
56
+ .us-margin-#{$position} {
57
+ margin-#{$position}: 1em;
58
+ }
59
+
60
+ .us-padding-#{$position} {
61
+ padding-#{$position}: 1em;
62
+ }
63
+
64
+ @each $space in $spacing {
65
+ .us-margin-#{$position}--#{nth($space,1)} {
66
+ margin-#{$position}: nth($space,2);
67
+ }
68
+
69
+ .us-padding-#{$position}--#{nth($space,1)} {
70
+ padding-#{$position}: nth($space,2);
71
+ }
72
+ }
73
+ }