@bloom-housing/ui-components 2.0.0-pre-tailwind

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 (223) hide show
  1. package/.jest/setup-tests.js +24 -0
  2. package/CHANGELOG.md +20 -0
  3. package/README.md +195 -0
  4. package/index.ts +148 -0
  5. package/jest.config.js +41 -0
  6. package/package.json +98 -0
  7. package/public/images/alameda-logo-white.svg +1 -0
  8. package/public/images/arrow-down.png +0 -0
  9. package/public/images/arrow-down.svg +1 -0
  10. package/public/images/check.png +0 -0
  11. package/public/images/check.svg +11 -0
  12. package/public/images/eho-logo-white.svg +1 -0
  13. package/public/images/eho-logo.svg +1 -0
  14. package/public/images/logo_glyph.svg +11 -0
  15. package/src/actions/Button.scss +157 -0
  16. package/src/actions/Button.tsx +80 -0
  17. package/src/actions/ExpandableContent.tsx +29 -0
  18. package/src/actions/ExpandableText.scss +18 -0
  19. package/src/actions/ExpandableText.tsx +52 -0
  20. package/src/actions/LinkButton.tsx +30 -0
  21. package/src/actions/LocalizedLink.tsx +11 -0
  22. package/src/authentication/AuthContext.ts +327 -0
  23. package/src/authentication/RequireLogin.tsx +62 -0
  24. package/src/authentication/index.ts +5 -0
  25. package/src/authentication/timeout.tsx +127 -0
  26. package/src/authentication/token.ts +17 -0
  27. package/src/authentication/useRequireLoggedInUser.ts +19 -0
  28. package/src/blocks/ActionBlock.scss +108 -0
  29. package/src/blocks/ActionBlock.tsx +51 -0
  30. package/src/blocks/AppStatusItem.scss +140 -0
  31. package/src/blocks/AppStatusItem.tsx +75 -0
  32. package/src/blocks/DashBlock.tsx +42 -0
  33. package/src/blocks/DashBlocks.scss +56 -0
  34. package/src/blocks/DashBlocks.tsx +7 -0
  35. package/src/blocks/FormCard.scss +201 -0
  36. package/src/blocks/FormCard.tsx +29 -0
  37. package/src/blocks/HousingCounselor.tsx +51 -0
  38. package/src/blocks/ImageCard.scss +91 -0
  39. package/src/blocks/ImageCard.tsx +77 -0
  40. package/src/blocks/InfoCard.scss +42 -0
  41. package/src/blocks/InfoCard.tsx +44 -0
  42. package/src/blocks/StatusBar.scss +30 -0
  43. package/src/blocks/StatusBar.tsx +31 -0
  44. package/src/blocks/ViewItem.scss +59 -0
  45. package/src/blocks/ViewItem.tsx +32 -0
  46. package/src/config/ConfigContext.tsx +36 -0
  47. package/src/config/NavigationContext.tsx +54 -0
  48. package/src/config/index.ts +2 -0
  49. package/src/footers/ExygyFooter.tsx +12 -0
  50. package/src/footers/SiteFooter.scss +28 -0
  51. package/src/footers/SiteFooter.tsx +10 -0
  52. package/src/forms/CloudinaryUpload.ts +50 -0
  53. package/src/forms/DOBField.tsx +132 -0
  54. package/src/forms/DateField.tsx +120 -0
  55. package/src/forms/Dropzone.scss +17 -0
  56. package/src/forms/Dropzone.tsx +67 -0
  57. package/src/forms/Field.tsx +115 -0
  58. package/src/forms/FieldGroup.tsx +82 -0
  59. package/src/forms/Form.tsx +22 -0
  60. package/src/forms/HouseholdMemberForm.tsx +41 -0
  61. package/src/forms/HouseholdSizeField.tsx +74 -0
  62. package/src/forms/PhoneField.tsx +69 -0
  63. package/src/forms/PhoneMask.tsx +24 -0
  64. package/src/forms/Select.tsx +80 -0
  65. package/src/forms/Textarea.scss +40 -0
  66. package/src/forms/Textarea.tsx +64 -0
  67. package/src/forms/TimeField.tsx +176 -0
  68. package/src/global/AppearanceTypes.ts +46 -0
  69. package/src/global/ApplicationStatusType.ts +6 -0
  70. package/src/global/accordion.scss +4 -0
  71. package/src/global/blocks.scss +137 -0
  72. package/src/global/custom_counter.scss +50 -0
  73. package/src/global/forms.scss +362 -0
  74. package/src/global/headers.scss +89 -0
  75. package/src/global/homepage.scss +8 -0
  76. package/src/global/index.scss +72 -0
  77. package/src/global/lists.scss +21 -0
  78. package/src/global/markdown.scss +33 -0
  79. package/src/global/mixins.scss +175 -0
  80. package/src/global/navbar.scss +280 -0
  81. package/src/global/print.scss +59 -0
  82. package/src/global/tables.scss +197 -0
  83. package/src/global/text.scss +141 -0
  84. package/src/global/vendor/AgPagination.tsx +133 -0
  85. package/src/global/vendor/_setup_bulma.scss +31 -0
  86. package/src/global/vendor/ag_grid.scss +140 -0
  87. package/src/headers/Hero.scss +56 -0
  88. package/src/headers/Hero.tsx +76 -0
  89. package/src/headers/PageHeader.scss +31 -0
  90. package/src/headers/PageHeader.tsx +39 -0
  91. package/src/headers/SiteHeader.tsx +136 -0
  92. package/src/helpers/address.tsx +46 -0
  93. package/src/helpers/blankApplication.ts +108 -0
  94. package/src/helpers/capitalize.tsx +7 -0
  95. package/src/helpers/dateToString.ts +11 -0
  96. package/src/helpers/debounce.ts +12 -0
  97. package/src/helpers/formOptions.tsx +229 -0
  98. package/src/helpers/formatYesNoLabel.ts +9 -0
  99. package/src/helpers/getTranslationWithArguments.ts +14 -0
  100. package/src/helpers/links.ts +7 -0
  101. package/src/helpers/localeRoute.tsx +13 -0
  102. package/src/helpers/mergeDeep.ts +12 -0
  103. package/src/helpers/nextjs.ts +7 -0
  104. package/src/helpers/numberOrdinal.ts +17 -0
  105. package/src/helpers/occupancyFormatting.tsx +46 -0
  106. package/src/helpers/pdfs.ts +19 -0
  107. package/src/helpers/photos.ts +19 -0
  108. package/src/helpers/preferences.tsx +426 -0
  109. package/src/helpers/resolveObject.ts +5 -0
  110. package/src/helpers/state.tsx +7 -0
  111. package/src/helpers/tableSummaries.tsx +80 -0
  112. package/src/helpers/translator.tsx +37 -0
  113. package/src/helpers/useKeyPress.ts +17 -0
  114. package/src/helpers/useMutate.ts +40 -0
  115. package/src/helpers/useOutsideClick.ts +25 -0
  116. package/src/helpers/validators.ts +3 -0
  117. package/src/icons/HeaderBadge.scss +29 -0
  118. package/src/icons/HeaderBadge.tsx +38 -0
  119. package/src/icons/Icon.scss +76 -0
  120. package/src/icons/Icon.tsx +145 -0
  121. package/src/icons/Icons.tsx +556 -0
  122. package/src/lists/PreferencesList.scss +72 -0
  123. package/src/lists/PreferencesList.tsx +60 -0
  124. package/src/locales/es.json +745 -0
  125. package/src/locales/general.json +1307 -0
  126. package/src/locales/general_OLD.json +868 -0
  127. package/src/locales/vi.json +745 -0
  128. package/src/locales/zh.json +745 -0
  129. package/src/navigation/Breadcrumbs.scss +25 -0
  130. package/src/navigation/Breadcrumbs.tsx +27 -0
  131. package/src/navigation/FooterNav.scss +47 -0
  132. package/src/navigation/FooterNav.tsx +19 -0
  133. package/src/navigation/LanguageNav.scss +32 -0
  134. package/src/navigation/LanguageNav.tsx +53 -0
  135. package/src/navigation/ProgressNav.scss +102 -0
  136. package/src/navigation/ProgressNav.tsx +50 -0
  137. package/src/navigation/TabNav.scss +38 -0
  138. package/src/navigation/TabNav.tsx +69 -0
  139. package/src/navigation/Tabs.scss +65 -0
  140. package/src/navigation/Tabs.tsx +93 -0
  141. package/src/navigation/UserNav.tsx +37 -0
  142. package/src/notifications/AlertBox.scss +78 -0
  143. package/src/notifications/AlertBox.tsx +79 -0
  144. package/src/notifications/AlertNotice.scss +58 -0
  145. package/src/notifications/AlertNotice.tsx +37 -0
  146. package/src/notifications/ApplicationStatus.scss +10 -0
  147. package/src/notifications/ApplicationStatus.tsx +64 -0
  148. package/src/notifications/ErrorMessage.tsx +15 -0
  149. package/src/notifications/SiteAlert.tsx +54 -0
  150. package/src/notifications/StatusAside.scss +11 -0
  151. package/src/notifications/StatusAside.tsx +25 -0
  152. package/src/notifications/StatusMessage.scss +25 -0
  153. package/src/notifications/StatusMessage.tsx +59 -0
  154. package/src/notifications/alertTypes.ts +7 -0
  155. package/src/notifications/index.ts +4 -0
  156. package/src/overlays/Drawer.scss +105 -0
  157. package/src/overlays/Drawer.tsx +51 -0
  158. package/src/overlays/LoadingOverlay.scss +25 -0
  159. package/src/overlays/LoadingOverlay.tsx +29 -0
  160. package/src/overlays/Modal.scss +55 -0
  161. package/src/overlays/Modal.tsx +61 -0
  162. package/src/overlays/Overlay.scss +50 -0
  163. package/src/overlays/Overlay.tsx +100 -0
  164. package/src/page_components/listing/AdditionalFees.tsx +56 -0
  165. package/src/page_components/listing/ListingCard.scss +47 -0
  166. package/src/page_components/listing/ListingCard.tsx +34 -0
  167. package/src/page_components/listing/ListingDetailHeader.tsx +25 -0
  168. package/src/page_components/listing/ListingDetails.tsx +29 -0
  169. package/src/page_components/listing/ListingMap.scss +36 -0
  170. package/src/page_components/listing/ListingMap.tsx +138 -0
  171. package/src/page_components/listing/ListingsGroup.scss +65 -0
  172. package/src/page_components/listing/ListingsGroup.tsx +49 -0
  173. package/src/page_components/listing/UnitTables.tsx +111 -0
  174. package/src/page_components/listing/listing_sidebar/ApplicationSection.tsx +49 -0
  175. package/src/page_components/listing/listing_sidebar/Apply.tsx +225 -0
  176. package/src/page_components/listing/listing_sidebar/LeasingAgent.tsx +77 -0
  177. package/src/page_components/listing/listing_sidebar/ListingUpdated.tsx +20 -0
  178. package/src/page_components/listing/listing_sidebar/ReferralApplication.tsx +28 -0
  179. package/src/page_components/listing/listing_sidebar/SidebarAddress.tsx +56 -0
  180. package/src/page_components/listing/listing_sidebar/Waitlist.tsx +94 -0
  181. package/src/page_components/listing/listing_sidebar/WhatToExpect.tsx +22 -0
  182. package/src/page_components/listing/listing_sidebar/events/DownloadLotteryResults.tsx +34 -0
  183. package/src/page_components/listing/listing_sidebar/events/EventDateSection.tsx +24 -0
  184. package/src/page_components/listing/listing_sidebar/events/LotteryResultsEvent.tsx +26 -0
  185. package/src/page_components/listing/listing_sidebar/events/OpenHouseEvent.tsx +27 -0
  186. package/src/page_components/listing/listing_sidebar/events/PublicLotteryEvent.tsx +22 -0
  187. package/src/prototypes/AppCard.scss +64 -0
  188. package/src/prototypes/Back.scss +19 -0
  189. package/src/prototypes/ButtonGroup.scss +6 -0
  190. package/src/prototypes/ButtonPager.scss +22 -0
  191. package/src/prototypes/FieldSection.scss +35 -0
  192. package/src/prototypes/FieldSection.tsx +31 -0
  193. package/src/prototypes/GridItem.tsx +15 -0
  194. package/src/prototypes/SideNav.scss +32 -0
  195. package/src/prototypes/SideNav.tsx +14 -0
  196. package/src/prototypes/SummaryCard.scss +34 -0
  197. package/src/sections/ContentSection.scss +15 -0
  198. package/src/sections/ContentSection.tsx +25 -0
  199. package/src/sections/FooterSection.scss +6 -0
  200. package/src/sections/FooterSection.tsx +16 -0
  201. package/src/sections/GridSection.scss +72 -0
  202. package/src/sections/GridSection.tsx +82 -0
  203. package/src/sections/InfoCardGrid.scss +45 -0
  204. package/src/sections/InfoCardGrid.tsx +20 -0
  205. package/src/sections/ListSection.scss +7 -0
  206. package/src/sections/ListSection.tsx +23 -0
  207. package/src/sections/MarkdownSection.scss +13 -0
  208. package/src/sections/MarkdownSection.tsx +21 -0
  209. package/src/sections/ResponsiveContentList.tsx +67 -0
  210. package/src/sections/ResponsiveWrappers.tsx +23 -0
  211. package/src/tables/GroupedTable.tsx +86 -0
  212. package/src/tables/MinimalTable.tsx +32 -0
  213. package/src/tables/ResponsiveTable.tsx +24 -0
  214. package/src/tables/StandardTable.tsx +229 -0
  215. package/src/text/Description.scss +52 -0
  216. package/src/text/Description.tsx +24 -0
  217. package/src/text/Message.scss +16 -0
  218. package/src/text/Message.tsx +16 -0
  219. package/src/text/Tag.scss +94 -0
  220. package/src/text/Tag.tsx +22 -0
  221. package/tailwind.config.js +128 -0
  222. package/tailwind.tosass.js +29 -0
  223. package/tsconfig.json +31 -0
@@ -0,0 +1 @@
1
+ <svg width="284" height="284" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill="#FFF" fill-rule="nonzero" d="M32.549 178.898l6.188-.007-4.976 3.742 1.932 5.928-4.962-3.644-4.961 3.659 1.945-5.928-5.035-3.742 6.173-.008 1.863-5.772M256.333 178.674l6.187-.007-4.977 3.75 1.93 5.926-4.963-3.641-4.961 3.657 1.944-5.942-5.032-3.735h6.174l1.86-5.787M25.195 131.672c-3.151-.386-5.482-1.516-6.991-3.396-1.305-1.644-1.825-3.58-1.552-5.825.366-3.01 1.637-5.078 3.805-6.228 1.215-.629 2.392-.899 3.529-.818l-.459 3.743c-.898.135-1.594.362-2.084.687-.879.578-1.393 1.527-1.559 2.848-.158 1.35.263 2.48 1.281 3.387 1.011.919 2.535 1.494 4.567 1.748 2.021.243 3.597.023 4.707-.671 1.107-.687 1.748-1.667 1.898-2.933.158-1.289-.15-2.33-.935-3.113-.425-.433-1.08-.83-1.982-1.192l.459-3.746c1.929.57 3.43 1.589 4.495 3.067 1.067 1.485 1.478 3.252 1.227 5.332-.315 2.569-1.399 4.479-3.248 5.753-1.845 1.265-4.241 1.713-7.158 1.357M34.938 92.939c3.048 1.169 5.047 2.925 6.012 5.263.829 1.794.774 3.904-.158 6.331-.935 2.424-2.308 4.028-4.124 4.796-2.284 1.1-4.946 1.058-7.999-.111-3.109-1.2-5.119-2.956-6.011-5.278-.83-1.794-.775-3.904.157-6.328.935-2.427 2.309-4.023 4.124-4.799 2.218-1.112 4.884-1.074 7.999.126m2.85 10.425c.545-1.408.46-2.729-.263-3.958-.718-1.229-2.037-2.207-3.95-2.948-1.902-.729-3.538-.888-4.9-.459-1.357.425-2.307 1.351-2.851 2.759-.545 1.412-.461 2.731.254 3.974.718 1.239 2.029 2.227 3.942 2.964 1.91.732 3.546.883 4.916.443 1.359-.444 2.308-1.371 2.852-2.775M30.666 81.834l2.087-3.264 9.419 6.019c1.053.676 1.905 1.046 2.546 1.1 1.104.166 2.076-.409 2.905-1.705.83-1.297.94-2.419.332-3.354-.332-.559-1.02-1.177-2.068-1.848l-9.418-6.019 2.084-3.265 9.422 6.026c1.636 1.038 2.739 2.104 3.326 3.195 1.057 2.006.74 4.337-.957 6.991-1.698 2.654-3.681 3.928-5.957 3.815-1.235-.069-2.663-.629-4.291-1.674M44.229 62.204l2.692-2.91 14.28 3.303-9.31-8.642 2.388-2.578L67.617 63.75l-2.577 2.775-14.581-3.334L59.951 72l-2.392 2.584M71.622 37.279l1.96 2.55-4.337 3.338 9.109 11.875-3.032 2.331-9.121-11.876-4.337 3.334-1.96-2.551M87.349 28.308l3.808-2.014-.069 12.879 3.198 6.046-3.372 1.786-3.195-6.038-10.88-7.103 3.958-2.091 7.05 5.235M127.942 25.298c.638 3.202.235 5.842-1.22 7.902-1.072 1.663-2.882 2.743-5.429 3.256-2.55.518-4.639.209-6.267-.906-2.148-1.343-3.546-3.611-4.187-6.821-.655-3.261-.247-5.899 1.23-7.902 1.068-1.659 2.879-2.739 5.43-3.252 2.546-.517 4.638-.208 6.266.907 2.129 1.28 3.521 3.549 4.177 6.816m-7.273 7.998c1.479-.301 2.547-1.072 3.203-2.338.646-1.273.774-2.909.37-4.915-.401-1.999-1.146-3.461-2.234-4.387-1.092-.915-2.38-1.224-3.858-.931-1.484.302-2.562 1.081-3.226 2.347-.663 1.271-.787 2.909-.386 4.915.404 2.014 1.153 3.477 2.262 4.387 1.096.916 2.384 1.224 3.869.922M134.813 15.792l12.954-.143.038 3.202-9.183.101.046 4.19 8.033-.089.047 3.137-8.049.089.089 7.662-3.777.039M172.498 19.492l4.159 1.123 1.467 19.241-3.982-1.076-.178-3.916-6.474-1.74-2.161 3.279-3.835-1.034m7.818-5.012l4.49 1.211-.347-7.508-4.143 6.297zM190.262 25.291l3.449 1.621-6.351 13.496 8.187 3.858-1.396 2.963-11.637-5.479M213.258 37.846l3.525 2.457-5.146 18.603-3.381-2.361 1.158-3.747-5.494-3.831-3.148 2.354-3.264-2.276m9.059-2.063l3.813 2.663 2.223-7.185-6.036 4.522zM236.694 57.898l3.812 3.896-13.002 12.721-2.461-2.512 8.805-8.607c.254-.243.609-.591 1.064-1.026.463-.44.825-.783 1.063-1.026l-13.334 8.202-2.602-2.654 8.512-13.134c-.246.235-.594.583-1.041 1.034-.455.459-.811.807-1.057 1.05l-8.797 8.607-2.464-2.512 13.013-12.725 3.85 3.943-7.902 12.381M251.014 82.121l-5.361-8.007-3.195 2.141 4.916 7.351-2.625 1.751-4.915-7.346-3.898 2.601 5.604 8.372-2.725 1.829-7.67-11.467 15.125-10.109 7.422 11.089M261.194 95.721c.416 1.045.664 1.96.726 2.751.115 1.335-.201 2.593-.918 3.754a8.18 8.18 0 01-2.215 2.33 14.495 14.495 0 01-2.64 1.485c-2.229.934-4.307 1.281-6.235 1.034-2.593-.34-4.429-1.774-5.494-4.313l-3.039-7.229 16.783-7.049m-1.468 4.621l-10.987 4.614 1.358 3.233c.693 1.651 1.998 2.466 3.912 2.435 1.041-.023 2.191-.293 3.435-.814 1.713-.718 2.907-1.539 3.596-2.457.703-.923.717-2.181.047-3.777l-1.361-3.234zM267.506 116.873l.67 4.244-16.961 9.213-.648-4.074 3.505-1.763-1.05-6.625-3.883-.629-.625-3.92m7.764 5.081l.74 4.6 6.707-3.392-7.447-1.208zM62.729 228.239c2.177-2.33 4.457-3.55 6.86-3.657 2.095-.093 3.967.625 5.625 2.176 2.215 2.061 3.145 4.307 2.798 6.729-.205 1.359-.679 2.471-1.412 3.351l-2.759-2.578c.417-.817.647-1.512.671-2.099.047-1.042-.42-2.014-1.389-2.934-.999-.926-2.16-1.25-3.495-.955-1.336.276-2.693 1.164-4.094 2.67-1.397 1.488-2.143 2.886-2.234 4.197-.089 1.313.332 2.393 1.254 3.256.957.896 1.976 1.25 3.075 1.08.594-.084 1.304-.386 2.126-.901l2.759 2.569c-1.59 1.233-3.295 1.844-5.12 1.836-1.825-.008-3.511-.717-5.035-2.146-1.887-1.769-2.805-3.772-2.742-6.004.071-2.253 1.106-4.445 3.112-6.59M88.564 236.581l3.763 2.091-3.188 19.021-3.6-1.99.757-3.852-5.865-3.24-2.882 2.67-3.478-1.922m8.786-2.994l4.078 2.246 1.455-7.369-5.533 5.123zM101.185 243.023l3.573 1.336-5.225 13.974 8.477 3.165-1.142 3.07-12.054-4.498M116.035 266.898l-3.657-.909 4.402-17.649 3.658.904M125.141 250.385l12.88 1.428-.356 3.187-9.129-1.018-.463 4.166 7.994.879-.346 3.135-7.998-.896-.846 7.616-3.742-.417M158.94 258.813c.4 3.248-.192 5.842-1.806 7.793-1.188 1.574-3.071 2.517-5.649 2.84-2.585.324-4.646-.139-6.181-1.373-2.045-1.497-3.271-3.865-3.665-7.106-.413-3.311.188-5.903 1.816-7.794 1.185-1.566 3.07-2.523 5.652-2.832 2.577-.324 4.646.131 6.174 1.366 2.038 1.434 3.25 3.802 3.659 7.106m-7.84 7.438c1.497-.187 2.624-.888 3.364-2.101.741-1.211.988-2.832.732-4.868-.238-2.029-.888-3.542-1.905-4.537-1.019-.995-2.27-1.404-3.773-1.212-1.497.178-2.623.88-3.384 2.1-.76 1.203-1.011 2.84-.76 4.861.255 2.037.896 3.55 1.93 4.545 1.025.996 2.291 1.397 3.796 1.212M169.913 246.08c1.195-.34 2.16-.479 2.878-.409a4.46 4.46 0 012.007.702c.509.324.957.727 1.335 1.188.378.463.679 1.035.896 1.722.255.825.31 1.698.14 2.624-.162.934-.681 1.705-1.536 2.338.903.076 1.613.355 2.138.849.519.479.974 1.343 1.352 2.548l.361 1.172c.255.787.448 1.319.609 1.582.24.418.563.672.988.771l.131.439-3.997 1.25a9.012 9.012 0 01-.524-.849 8.65 8.65 0 01-.625-1.45l-.531-1.605c-.363-1.104-.78-1.774-1.273-2.029-.479-.255-1.235-.224-2.246.102l-3.542 1.11 2.13 6.806-3.542 1.111-5.455-17.347m4.479 1.874l1.474 4.676 3.912-1.228c.771-.246 1.327-.523 1.659-.832.587-.557.718-1.313.409-2.284-.332-1.058-.889-1.659-1.659-1.821-.439-.085-1.034 0-1.774.225l-4.021 1.264zM179.96 242.545l3.595-1.667 11.969 8.474-5.348-11.538 3.196-1.473 7.638 16.514-3.426 1.583-12.23-8.622 5.439 11.762-3.185 1.481M209.809 247.855l-3.273 1.875-9.051-15.781 3.271-1.883M209.276 226.611l3.441-2.586 16.043 10.719-3.295 2.479-3.195-2.27-5.371 4.013 1.259 3.728-3.179 2.377m.871-9.246l3.728-2.786-6.119-4.367 2.391 7.153z"/><path d="M141.689 283.992l-.046-.016C63.442 283.791.081 220.398.046 142.611c-.065-.39-.031-.617-.046-.617C0 63.735 63.339.231 141.612.026c.217-.031.31-.031.354-.019h.031c78.344.019 141.896 63.48 141.982 141.855v.443c-.146 78.2-63.569 141.616-141.836 141.687v-2.524l.88-2.36-.88 2.36v2.524h-.454zM5.062 142.14c.066 75.573 61.363 136.79 136.92 136.79 0 .03.052.03.146.03h.016v-.017c75.558-.084 136.774-61.377 136.774-136.919.063 0 0-.02.016-.274-.146-75.53-61.418-136.677-136.936-136.677h-.131C66.278 5.139 5.062 66.432 5.062 141.994H3.384l1.678.146z" fill="#FFF" fill-rule="nonzero"/><path d="M140.43 243.29c-55.162-.84-99.654-45.797-99.712-101.176C40.664 86.172 85.967 40.78 141.903 40.731c55.937-.058 101.333 45.243 101.388 101.183.055 55.373-44.345 100.415-99.51 101.372l-1.675.015-1.675-.012zm1.67-4.989c53.178-.06 96.244-43.211 96.191-96.383-.053-53.177-43.208-96.243-96.383-96.187-53.175.046-96.242 43.197-96.19 96.378.055 52.645 42.35 95.382 94.79 96.18l1.592.012z" fill="#FFF" fill-rule="nonzero"/><path d="M177.035 92.04l11.367-12.968s-3.797-2.527-8.844 4.117c-5.045 6.637-2.523 8.851-2.523 8.851M178.617 93.301l12-13.292s2.584 3.866-2.517 9.492c-6.319 6.96-9.483 3.8-9.483 3.8M195.317 78.953c.732-.996-.217-2.921-2.106-4.313-1.883-1.39-4.012-1.706-4.738-.71-.731.995.209 2.924 2.092 4.313 1.896 1.392 4.018 1.705 4.752.71M196.141 74.091a2.459 2.459 0 10-.008-4.916 2.442 2.442 0 00-2.445 2.458 2.453 2.453 0 002.453 2.458M188.194 107.095a2.345 2.345 0 10-.007-4.692 2.338 2.338 0 00-2.338 2.346 2.343 2.343 0 002.345 2.346M168.509 97.418s-28.729 31.958-43.572 48.715c-14.839 16.776-41.033 55.359-41.033 55.359s34.736-33.86 48.946-49.664c14.207-15.823 42.928-49.992 42.928-49.992l-2.839-1.887-83.035 94.267 80.82-94.899M184.598 103.654c.764-.429 1.736-1.212 1.713-1.817-.022-.775-1.174-1.748-2.27-1.185-.888.439-1.697 1.254-1.267 2.423.326.844 1.184.933 1.824.579M182.668 99.29c.262-1.373-1.095-1.863-1.921-2.361-1.836-1.115-3.503 1.026-3.342 2.338.332 2.708 4.576 3.634 5.263.023M173.849 98.132c.424.188.727.807 1.273.505 1.25-.694 1.396-2.322 2.546-3.117-1.28-1.505-3.079-3.113-5.017-2.411-3.131 1.138-1.217 3.958 1.198 5.023M170.716 92.36c.617.174 1.242-.305 1.119-.567-1.158-2.685-5.456-3.549-5.881-.022-.239 1.997 4.106 3.807 4.762.589M165.013 89.829c.463-.404 1.188-.979 1.104-1.184-.71-1.629-3.18-.745-3.457.602-.038.212.378.733.595 1.157.832 1.694 1.218-.093 1.758-.575M162.428 86.626c.378-.482-.077-1.011-.586-1.153-1.289-.37-2.57-.031-3.049 1.242-.472 1.224-.069 2.747 1.195 2.94 1.73.251 1.575-1.937 2.44-3.029M111.182 120.132c-14.635 20.156-28.93 37.823-42.16 57.671 6.378 3.396 14.002-.387 20.9-1.714 2.964-.569 9.355-.586 9.355-.586s24.188-33.197 52.493-62.262c-11.409-8.338-24.731 1.824-37.241 3.557-1.257.174-2.313 1.91-3.347 3.334" fill="#FFF" fill-rule="nonzero"/><path d="M117.637 99.402c-6.281 2.484-12.335 4.784-18.2 8.434-1.47.907-1.327 3.207-1.161 4.804.822 7.782.271 16.521.421 23.097 4.865-6.518 10.337-14.002 15.147-20.562 8.724.482 16.521-3.989 24.647-6.343-.814-5.745 1.674-12.849-1.281-17.702-6.74 2.237-12.93 5.652-19.573 8.272" fill="#FFF" fill-rule="nonzero"/><path d="M98.38 135.743a70.633 70.633 0 01-.051-2.762c0-2.921.081-6.108.081-9.388 0-3.639-.081-7.393-.455-10.915a13.52 13.52 0 01-.111-1.659c0-1.297.243-2.728 1.427-3.457 5.896-3.673 11.974-5.98 18.242-8.465 6.629-2.597 12.817-6.027 19.964-8.138 1.219 2.014 1.527 4.371 1.527 6.837 0 2.717-.391 5.591-.391 8.269 0 .926.065 1.852-.03 3.071-7.687 2.191-15.124 6.366-23.424 6.386-.439 0-.896-.02-1.058-.162-4.823 6.559-10.282 14.048-15.155 20.561l-.552.733-.014-.911zm1.215-27.645c-.86.518-1.118 1.671-1.118 2.921 0 .536.05 1.092.111 1.578.374 3.572.455 7.342.455 10.996 0 3.279-.081 6.482-.081 9.388 0 .629.008 1.238.022 1.84 4.72-6.339 9.979-13.523 14.874-19.967.439.031.86.031 1.301.031 8.071 0 15.479-4.125 23.016-6.008a20.243 20.243 0 01-.178-2.813c0-2.743.374-5.603.374-8.269 0-2.403-.31-4.646-1.072-6.366-6.694 2.227-12.883 5.637-19.543 8.269-6.285 2.485-12.327 4.777-18.161 8.4z"/><path d="M164.704 118.516c-15.35 18.979-34.012 33.96-44.482 55.443 14.287-4.244 29.196-6.219 44.251-5.107 14.061-18.412 26.538-37.916 39.764-56.927-3.797-1.937-7.522.664-11.344-.177-6.858-1.501-13.666-4.218-20.108-1.887-3.62 1.32-5.504 5.468-8.081 8.655" fill="#FFF" fill-rule="nonzero"/><path d="M164.442 118.307c2.555-3.121 4.43-7.35 8.219-8.747 1.82-.683 3.688-.926 5.57-.926 4.861 0 9.792 1.721 14.716 2.798a7.692 7.692 0 001.599.162c2.082 0 4.229-.718 6.451-.733 1.096 0 2.244.196 3.494 1.234-13.22 19.01-25.704 38.521-40.049 57.058-2.777-.23-5.541-.31-8.304-.31-12.181 0-24.211 1.953-36.21 4.978 10.518-21.583 29.204-36.554 44.514-55.514zm-44.321 55.329c11.676-3.456 23.774-5.425 36.018-5.425 2.763 0 5.541.092 8.079.439 14.053-18.396 26.523-37.89 39.873-56.439-1.041-.536-2.068-.718-3.094-.718-2.076 0-4.23.718-6.451.733a7.988 7.988 0 01-1.729-.178c-4.971-1.092-9.871-2.798-14.585-2.798-1.82 0-3.604.259-5.348.896-3.449 1.25-5.332 5.316-7.948 8.569-15.372 19.007-34.015 33.978-44.815 54.921zM113.272 174.917l3.793.308 7.254-12.015" fill="#FFF" fill-rule="nonzero"/><path d="M113.25 175.225l-.668-.076 11.51-12.162.501.379-7.555 12.169-3.788-.31zm3.542-.177l5.722-9.478-8.589 9.105 2.867.373z"/><path fill="#FFF" fill-rule="nonzero" d="M199.213 141.009l3.149-4.425 6.652.305M214.692 136.252v1.582l-1.897.95 1.588 8.846-28.427 12.979 11.675-17.068 17.061-7.289zm-17.994 17.398c-.549.293-1.698.308-1.158 1.203.117.192.873.209 1.088-.008.209-.209.07-.771.07-1.195zm5.626-2.424c-.804-.447-1.521.325-1.097 1.097.107.184.873.208 1.088-.009.209-.224.187-.987.009-1.088zm-4.476-1.311c-.101-.179-.873-.201-1.082.024-.215.207-.192.978-.008 1.08.795.456 1.514-.326 1.09-1.104zm10.709-1.258c-.19-.385-.807.117-1.117.563.492-.061 1.697.587 1.117-.563zm-4.914-.703c-.495.062-1.344-.571-1.266.633.424-.208.84-.417 1.266-.633zm-5.055-1.257c-.332.393-1.73-.649-1.127.563.084.155 1.266.78 1.127-.563zm10.743-1.83c-.217 0-.418.34-.633.556h1.266c-.217-.216-.418-.556-.633-.556zm-4.423-.068c-.632-.903-1.427-.972-1.814.031-.045.115.332.531.549.531.416 0 .84-.354 1.265-.562zm5.54-3.045c-.285-.324-1.382-.413-1.736.513-.215.571.007.861.611.61.57-.247 1.765-.413 1.125-1.123zM196.758 158.125l19.27-8.542.517 1.142-19.285 8.55zM180.037 168.898l2.445-3.534 11.06-5.703s4.43-.642 5.379 3.789c.957 4.422-1.258 6.319-1.258 6.319l-59.393 34.826s.745-4.229-1.271-6.945c-2.188-2.963-7.586-3.156-7.586-3.156l17.689-9.814 22.766-1.289 8.635-12.246"/><path d="M194.823 173.566s4.422-.949 10.426-.323c6.01.625 10.748 2.516 10.748 2.516l-45.791 33.868s-10.124-1.258-17.077-.617c-6.952.641-12.952 3.813-16.745 4.444-3.792.633-11.378.017-13.28-4.729-1.896-4.746-.949-10.41 2.521-12.016 2.053-.941 4.742 0 4.742 0s-6.702 3.98-3.785 9.8c1.586 3.164 4.75 2.841 4.75 2.841 1.895.315 7.89-3.164 10.104-4.121 2.21-.942 53.387-31.663 53.387-31.663" fill="#FFF" fill-rule="nonzero"/><path d="M133.525 197.333l-3.477 1.897s1.895 0 2.852 1.892c.949 1.897.316 2.854.316 2.854l2.527-1.266s.94-1.898-.009-3.164c-.948-1.265-2.209-2.213-2.209-2.213" fill="#FFF" fill-rule="nonzero"/><path d="M135.428 205.074l-3.477 1.279s.633-2.375-.63-3.949c-1.272-1.59-1.272-1.266-2.53-.633-1.267.633-.949 2.522.315 4.104 1.267 1.574 2.338 1.729 3.478 1.729 1.266 0 2.844-2.53 2.844-2.53M80.068 158.828l16.413-21.507.293-29.08s-7.269.641-10.749-.309c-3.483-.941-4.746-2.836-4.746-2.836s3.16 1.887 6.638 2.203c3.483.316 8.851-.641 8.851-.641l39.021-16.949-.791-.475-39.179 16.162s-4.74 1.262-9.167.008c-4.426-1.258-4.426-2.523-4.426-2.523l38.865-16.475-1.898-.633-38.229 16.159s-.316.315-.949 1.265-.475 2.057-.475 2.057l.166 8.061s3.168 2.527 6.645 3.152c3.48.633 8.534-.008 8.534-.008l-.316 1.578s-5.369.956-8.847.324c-3.477-.626-5.691-2.52-5.691-2.52l.316 2.526s2.527 1.574 5.375 1.891c2.844.316 8.847-.007 8.847-.007v1.894s-6.636.324-8.847.008c-2.215-.305-5.691-1.887-5.691-1.887" fill="#FFF" fill-rule="nonzero"/><path d="M123.459 87.352l8.691 1.57-35.067 14.89s-2.849 1.743-6.641 1.114c-3.793-.625-4.426-1.574-4.426-1.574l37.443-16zm-31.75 14.257l-2.053.787-.474.987h1.894l.791-.829-.158-.945zm5.685.941c-1.049.216-2.299-.544-3.16.633.426 0 .847-.031 1.263.015.769.089 1.455.135 1.897-.648zm7.551-3.179c.26-.548-.268-.957-.45-.556-.498 1.107-2.134-.301-2.045 1.201.859-.131 1.96.466 2.495-.645zm-5.022-.776l-1.582.158-.787.633c.125.046 1.308.46 2.211.158.949-.316.158-.949.158-.949zm12.64-3.013c-.586.339-1.154.756-1.896.629-.174 1.409.901.467 1.279.514.401.049.791-.53.617-1.143zm-4.585-.787l-1.264.949.01.003c.153.05 1.915.602 2.521-.003.629-.633-1.267-.949-1.267-.949zm12.668-2.276c-.258-.317-1.138-.104-1.771-.104.404.323-.787 1.547.625 1.207.603-.139 1.764-.332 1.146-1.103zm-4.767-1.05c-.158 0-.318.949-.31.948.07-.01.537-.07.955-.108l.088-.01.018-.045c.11-.251.447-.627.355-.627-.157 0-.948-.158-1.106-.158zm11.848-2.292c-1.88 0-2.197.76-1.781 1.227.673.749 1.622-.324 2.351-.675.356-.166.047-.552-.57-.552zm-5.064-.572l-.02.02c-.12.167-.604 1.254-.604 1.254 0-.154 1.735-.471 1.735-.471l.316-.791-.018.002c-.165.018-1.402.145-1.402-.002l-.007-.012zM67.718 133.555s1.895 1.262 4.426 1.57c2.526.316 5.688-.316 5.688-.316l.03 27.5s-1.262 2.529-4.737 2.529c-3.478.008-5.375-1.574-5.375-1.574M68.068 168.952l.008 6.319 4.102-5.378M206.768 112.241l1.898 7.262-40.073 59.474-42.989 3.193s-2.526-1.266-3.477-2.84c-.949-1.59-1.586-3.473-1.586-3.473l44.248-4.475 41.979-59.141zm-41.022 65.145l-14.229.649-1.891 1.264 16.437-.647-.317-1.266zm-.633-2.206l-10.116.008-2.848 1.905 13.281-.648-.317-1.265zm5.524-.794s.95-1.266-.154-1.104c-1.11.154-2.53 1.898-2.53 1.898l1.897.788zm-5.848-2.047l-7.585.634-1.258 1.265 9.159-.324-.316-1.575zm8.536-3.804l-1.421 1.582s.787.633.941.633c.162 0 .795-1.111.795-1.111l-.315-1.104zm-3.637.641c-.162-.957-.787-.324-.787-.324l-.948.949v.949l.048-.017c.294-.106 1.828-.706 1.687-1.557zm2.054-.171l-.949.315-.004.018c-.037.166-.322 1.411-.468 1.411h.787l.634-1.744zm2.207-6.319c-.009-.949-.787-.162-.787-.162l-1.429.795.48 1.103.014-.006c.164-.077 1.722-.83 1.722-1.73zm4.266.154c0-.162-1.104 0-1.104 0s-1.742 1.266-1.742 1.428l1.426.154.949-.316s.471-1.104.471-1.266zm-.163-5.842c.154-.957-.316-.633-.316-.633l-1.58.633-.316 1.42.316.471.044-.025c.272-.156 1.705-1.014 1.852-1.866zm3.953-.486l-1.111 1.427-.155.788.633.154.949-1.104-.316-1.265zm-2.215.633l-.949.794.471.634.949-.634-.471-.794zm1.877-6.764l-.076.018c-.304.064-.697.109-.697.109l-1.11 1.429.315 1.258 1.898-1.891-.007-.013c-.042-.087-.279-.58-.32-.88l-.003-.03zm4.281.599l-1.111 1.42v.479l.01.009c.145-.024 1.734-1.753 1.734-1.753l-.633-.155zm-1.899-.154l-.949 1.104.633.795 1.103-1.267-.787-.632zm5.842-5.696l-.949 1.259.162.948 1.258-1.573-.471-.634zm-4.105-.478l-1.266.633-.316 1.899 1.736-1.899-.154-.633zm2.685.478l-1.428.787v.95h.795l.633-1.737zm3.627-5.694l-1.42 1.735.471.317.949-1.108v-.944zm-2.369-.946c-.153 0-1.42 1.106-1.42 1.106l-.795 1.104 1.111.633 1.42-2.053-.005-.022c-.027-.128-.172-.768-.311-.768zm3.789.63l-.787 1.26.154.95 1.266-1.265-.633-.945zm2.84-5.854c-.138 0-1.447 1.684-1.695 2.005l-.04.052-.162.633 1.582-1.582.161-.569v1.205h1.735v-1.424l-1.672-.001zm-2.84-.629l-1.266 1.266c-.036.142-.424 1.736.633 1.736 1.104 0 1.42-2.211 1.42-2.211l-.787-.791zm8.049-5.224l-1.266 1.582.317 1.107 1.582-2.373-.633-.316zm-3.319.166c-.434-.582-1.808.707-2.025.917l-.029.028.318 1.266.009-.006c.151-.11 2.188-1.6 1.727-2.205zm2.053-.004s-.471.633-.625.633c-.162 0-.633 1.262-.633 1.262s.471-.158.633-.158c.155-.001.625-1.737.625-1.737zm3.789-5.22l-1.265.158.316 1.582.795-.316.154-1.424zm-1.89-1.104l-1.111.158-.787 1.266-.008.01c-.062.085-.458.635-.308.781.153.159.47.475.47.475l1.744-2.057v-.633zm3.309-5.69c-.154 0-1.104 1.262-1.104 1.262s-.793 1.423-.16 1.581c.633.158 1.428-1.74 1.582-1.74.153 0 .315-.945.315-.945s-.471-.158-.633-.158zM97.156 179.038l-2.526 3.796-27.491 1.605 1.257-2.839M112.327 177.124l3.793-.31s-1.582 3.789-4.103 4.738c-2.526.949-4.741.008-4.741.008M66.822 186.337l26.55-1.605-.316.95-26.234 1.289" fill="#FFF" fill-rule="nonzero"/><path d="M118.335 178.389s-2.84 3.789-5.051 5.063c-2.211 1.266-10.43 1.272-10.43 1.272l-.948.948s10.111-.323 12.011-1.589c1.895-1.273 4.102-3.172 4.102-3.172s2.853 2.531 4.75 3.156c1.998.671 46.458-1.938 46.458-1.938l-.008-.948-43.607 2.254s-1.998-.418-3.482-1.258c-2.217-1.264-3.795-3.788-3.795-3.788" fill="#FFF" fill-rule="nonzero"/><path d="M170.445 179.84l37.921-55.911"/><path fill="#FFF" fill-rule="nonzero" d="M170.307 179.748l37.92-55.904.263.162-37.921 55.919zM157.188 172.811l7.585-.634.017.162.146-.046.162 1.768-9.274.054 1.364-1.304zm.124.262l-1.381 1.003 9.005-.131-.285-1.451-7.339.579zM154.989 175.025l10.108-.017.023.162.139-.039.17 1.468-13.381.354 2.941-1.928zm-2.855 1.898l13.126-.455-.27-1.135-9.916-.017-2.94 1.607z"/><path d="M151.509 177.865l14.222-.648.017.162.146-.039.162 1.467-16.529.354 1.982-1.296zm.085.293l-1.983.973 16.299-.456-.285-1.134-14.031.617z"/><path d="M77.502 119.005v3.477s-2.207 1.266-3.784.949c-1.59-.309-2.855-1.574-2.855-1.574" fill="#FFF" fill-rule="nonzero"/><path d="M77.514 129.751v-2.844s-1.897.316-5.058-.309c-3.16-.633-3.644-.949-3.644-.949v-1.578s1.803 1.119 3.636 1.578c1.9.467 5.058-.324 5.058-.324v-1.262s-3.321.787-5.69.166c-2.322-.617-2.844-2.057-2.844-2.057l10.104-5.695-.316-.948-11.054 5.694-.31 6.324s1.267 1.895 4.109 2.211c2.845.31 6.009-.007 6.009-.007" fill="#FFF" fill-rule="nonzero"/><path d="M71.479 129.906c-2.909-.324-4.209-2.258-4.24-2.373l.391-6.447 11.273-5.603.242 1.139-10.022 5.506c.02-.02.471 1.347 2.73 1.948.633.162 1.378.228 2.097.228 1.815 0 3.507-.39 3.719-.243l-.131 1.412s-1.902.471-3.654.471c-.521 0-1.022-.034-1.479-.146-1.667-.421-3.278-1.354-3.448-1.647l-.063 1.37c.021-.016.439.293 3.592.926 1.544.293 2.794.374 3.669.374.861 0 1.332-.065 1.514.081v2.844h-.166l.02.162s-1.445.131-3.249.131c-.88-.002-1.853-.022-2.795-.133zm-3.623-8.674l-.323 6.22s1.22 1.837 3.992 2.146a26.73 26.73 0 002.747.131c1.472 0 2.697-.089 3.096-.119l.17-2.547c-.017 0-.506.081-1.383.081-.891 0-2.159-.081-3.733-.39-3.168-.633-3.654-.957-3.771-1.104l.243-1.721s1.786 1.119 3.592 1.559c.405.111.893.146 1.396.146 1.633 0 3.415-.432 3.461-.328l.193-1.104c0 .02-1.722.409-3.588.409-.733 0-1.497-.065-2.178-.228-2.388-.633-2.938-2.13-2.878-2.357l10.023-5.506-.101-.86-10.958 5.572z"/><path d="M67.714 129.759v1.739s1.902 1.582 4.268 1.898c2.376.305 5.688-.166 5.688-.166l-.158-1.581s-3.792.475-5.528.158c-1.743-.308-4.112-2.048-4.27-2.048M68.223 165.633v1.582s1.74.949 2.844 1.111c1.107.154 2.373.146 2.373.146l1.578-1.582s-2.686.008-3.951-.154c-1.262-.153-2.844-1.103-2.844-1.103M179.319 158.889l1.104-1.265-.633-.633-.787.948" fill="#FFF" fill-rule="nonzero"/><path fill="#2B3C78" fill-rule="nonzero" d="M207.879 118.4l-.47.475.633.158"/></g></svg>
Binary file
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><path d="M31.1 9.2c-.5-.4-1.2-.4-1.5 0L16 22.8C15.8 22.5 2.4 9.2 2.4 9.2c-.4-.4-1.1-.4-1.5 0s-.4 1.2 0 1.5l13.6 13.6.1.1 1.4 1.4 15.1-15.1c.4-.4.4-1.1 0-1.5zM16.1 25.8z"/></svg>
Binary file
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!-- Generator: Adobe Illustrator 19.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
3
+ <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
4
+ viewBox="0 0 16 16" style="enable-background:new 0 0 16 16;" xml:space="preserve">
5
+ <style type="text/css">
6
+ .st0{fill:#FFFFFF;}
7
+ </style>
8
+ <path class="st0" d="M6.3,12.9c-0.3,0-0.6-0.1-0.8-0.3L1.8,8.9C1.7,8.7,1.6,8.4,1.6,8.2c0-0.3,0.1-0.5,0.3-0.7
9
+ C2,7.3,2.3,7.2,2.6,7.2h0.3l0.2,0.1c0.1,0,0.2,0.1,0.2,0.2l2.9,2.9L13,3.7c0.2-0.2,0.5-0.3,0.8-0.3c0.3,0,0.5,0.1,0.7,0.3
10
+ c0.2,0.2,0.3,0.6,0.3,0.9c0,0.3-0.2,0.5-0.4,0.7L7,12.6C6.8,12.8,6.6,12.9,6.3,12.9z"/>
11
+ </svg>
@@ -0,0 +1 @@
1
+ <svg width="100" height="96" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="nonzero"><path d="M11.485 78.11H7.573v1.549h3.593v1.307H7.573v1.903h4.085v1.308H6.065v-7.37h5.42v1.304-.001zm4.946 4.063l.74.696c-.258.132-.543.2-.832.197-.832 0-2.003-.512-2.003-2.575s1.17-2.575 2.003-2.575c.831 0 2 .512 2 2.575 0 .69-.133 1.2-.338 1.583l-.78-.729-.79.828zm3.48 1.702l-.803-.755c.452-.576.772-1.417.772-2.629 0-3.458-2.567-3.878-3.542-3.878-.975 0-3.54.42-3.54 3.878 0 3.46 2.565 3.88 3.54 3.88.43 0 1.19-.08 1.888-.495l.874.834.811-.835zm7.216-2.275c0 1.938-1.172 2.77-3.03 2.77-.677 0-1.683-.164-2.34-.892-.4-.448-.554-1.049-.574-1.786v-4.886h1.57v4.782c0 1.03.596 1.479 1.313 1.479 1.058 0 1.488-.513 1.488-1.406v-4.855h1.573V81.6zm4.124-3.13h.022l.912 2.915h-1.881l.947-2.915zm-1.358 4.184h2.721l.473 1.524h1.673l-2.595-7.372h-1.777l-2.627 7.372h1.621l.511-1.524zm7.608.19h3.664v1.333h-5.206v-7.37h1.542v6.037zm9.502-1.975v3.308h-1.537v-7.37h1.537v2.79h2.875v-2.79h1.537v7.37h-1.537V80.87h-2.875v-.001zm7.347-.378c0-2.063 1.172-2.575 2-2.575.834 0 2.004.512 2.004 2.575s-1.17 2.575-2.004 2.575c-.828 0-2-.512-2-2.575zm-1.538 0c0 3.46 2.568 3.88 3.538 3.88.98 0 3.544-.42 3.544-3.88 0-3.459-2.564-3.878-3.544-3.878-.97 0-3.538.42-3.538 3.878zm14.432 1.11c0 1.937-1.172 2.77-3.03 2.77-.678 0-1.681-.165-2.34-.893-.4-.448-.555-1.049-.573-1.786v-4.886h1.568v4.782c0 1.03.597 1.479 1.317 1.479 1.057 0 1.487-.513 1.487-1.406v-4.855h1.572V81.6l-.001.001zm2.817.306c.014.41.22 1.19 1.564 1.19.727 0 1.54-.173 1.54-.956 0-.572-.554-.728-1.333-.912l-.792-.185c-1.194-.277-2.342-.54-2.342-2.162 0-.822.444-2.27 2.834-2.27 2.26 0 2.865 1.477 2.876 2.38h-1.48c-.04-.325-.164-1.108-1.509-1.108-.583 0-1.281.216-1.281.883 0 .578.472.696.777.768l1.798.442c1.006.247 1.928.658 1.928 1.981 0 2.22-2.256 2.413-2.904 2.413-2.687 0-3.148-1.55-3.148-2.464h1.472zm7.382 2.27h-1.535v-7.37h1.535v7.37zm6.15-7.37h1.436v7.37H83.49l-3.005-5.258h-.026v5.258h-1.436v-7.37h1.622l2.922 5.132h.026v-5.133.001zm6.588 3.397h3.077v3.973h-1.024l-.154-.923c-.39.447-.954 1.116-2.3 1.116-1.774 0-3.384-1.273-3.384-3.858 0-2.01 1.119-3.911 3.6-3.9 2.261 0 3.155 1.466 3.232 2.486H91.69c0-.288-.525-1.214-1.611-1.214-1.1 0-2.116.759-2.116 2.646 0 2.014 1.099 2.536 2.145 2.536.339 0 1.471-.131 1.786-1.622h-1.713v-1.24zM7.277 91.688c0-2.063 1.17-2.578 2-2.578.831 0 2 .515 2 2.578 0 2.061-1.169 2.578-2 2.578-.83 0-2-.517-2-2.578zm-1.54 0c0 3.457 2.566 3.883 3.54 3.883.976 0 3.541-.426 3.541-3.883 0-3.458-2.566-3.879-3.54-3.879-.975 0-3.54.421-3.54 3.879h-.001zm11.3-.248v-2.167h1.22c.954 0 1.356.3 1.356 1.019 0 .328 0 1.148-1.15 1.148h-1.427.001zm0 1.275H18.8c1.982 0 2.35-1.685 2.35-2.351 0-1.447-.86-2.361-2.288-2.361h-3.365v7.371h1.54v-2.659zm8.291-1.275v-2.167h1.22c.954 0 1.355.3 1.355 1.019 0 .328 0 1.148-1.148 1.148h-1.427zm0 1.275h1.766c1.98 0 2.35-1.685 2.35-2.351 0-1.447-.86-2.361-2.288-2.361h-3.368v7.371h1.54v-2.659zm7.966-1.027c0-2.063 1.167-2.578 2.002-2.578.827 0 2 .515 2 2.578 0 2.061-1.172 2.578-2 2.578-.835 0-2.002-.517-2.002-2.578zm-1.54 0c0 3.457 2.565 3.883 3.542 3.883.972 0 3.538-.426 3.538-3.883 0-3.458-2.566-3.879-3.538-3.879-.977 0-3.542.421-3.542 3.879zm11.27-.442v-1.973h1.917c.904 0 1.077.578 1.077.967 0 .73-.389 1.006-1.19 1.006h-1.804zm-1.513 4.129h1.513V92.49h1.588c1.14 0 1.203.388 1.203 1.394 0 .758.058 1.137.161 1.49h1.706v-.198c-.329-.122-.329-.39-.329-1.464 0-1.38-.328-1.603-.933-1.87.728-.245 1.137-.945 1.137-1.754 0-.638-.357-2.084-2.318-2.084h-3.728v7.371zm11.782 0h-1.539v-6.068h-2.226v-1.304h5.994v1.304h-2.229v6.068zm10.49-2.58c0 1.94-1.17 2.776-3.029 2.776-.674 0-1.68-.171-2.338-.898-.4-.45-.554-1.046-.572-1.784v-4.886h1.568v4.782c0 1.026.596 1.481 1.314 1.481 1.056 0 1.487-.517 1.487-1.409v-4.854h1.571v4.792h-.001zm7.45-4.792h1.44v7.372H71.13l-3.008-5.258h-.016v5.258h-1.44v-7.372h1.622l2.927 5.13h.018v-5.13zm5.783 7.372h-1.544v-7.372h1.544v7.372zm6.01 0h-1.539v-6.068h-2.223v-1.304h5.99v1.304h-2.228v6.068zm8.049 0h-1.543v-2.783l-2.542-4.589h1.815l1.53 3.204 1.46-3.204h1.742l-2.462 4.607v2.765zM49.63.03L.01 24.471v11.48h5.553v34.436h87.76V35.951h6.669V24.47L49.63.03zm32.956 59.985H16.302V28.544L49.63 11.51l32.956 17.033v31.472z"/><path d="M64.809 39.65H34.078V28.544h30.73V39.65h.001zm0 15.93H34.078V44.466h30.73V55.58h.001z"/></g></svg>
@@ -0,0 +1 @@
1
+ <svg width="100" height="96" xmlns="http://www.w3.org/2000/svg"><g fill="#000" fill-rule="nonzero"><path d="M11.485 78.11H7.573v1.549h3.593v1.307H7.573v1.903h4.085v1.308H6.065v-7.37h5.42v1.304zm4.946 4.063l.74.696c-.258.132-.543.2-.832.197-.832 0-2.003-.512-2.003-2.575s1.17-2.575 2.003-2.575c.831 0 2 .512 2 2.575 0 .69-.133 1.2-.338 1.583l-.78-.729-.79.828zm3.48 1.702l-.803-.755c.452-.576.772-1.417.772-2.629 0-3.458-2.567-3.878-3.542-3.878-.975 0-3.54.42-3.54 3.878 0 3.46 2.565 3.88 3.54 3.88.43 0 1.19-.08 1.888-.495l.874.834.811-.835zm7.216-2.275c0 1.938-1.172 2.77-3.03 2.77-.677 0-1.683-.164-2.34-.892-.4-.448-.554-1.049-.574-1.786v-4.886h1.57v4.782c0 1.03.596 1.479 1.313 1.479 1.058 0 1.488-.513 1.488-1.406v-4.855h1.573V81.6zm4.124-3.13h.022l.912 2.915h-1.881l.947-2.915zm-1.358 4.184h2.721l.473 1.524h1.673l-2.595-7.372h-1.777l-2.627 7.372h1.621l.511-1.524zm7.608.19h3.664v1.333h-5.206v-7.37h1.542v6.036zm9.502-1.975v3.308h-1.537v-7.37h1.537v2.79h2.875v-2.79h1.537v7.37h-1.537V80.87h-2.875zm7.347-.378c0-2.063 1.172-2.575 2-2.575.834 0 2.004.512 2.004 2.575s-1.17 2.575-2.004 2.575c-.828 0-2-.512-2-2.575zm-1.538 0c0 3.46 2.568 3.88 3.538 3.88.98 0 3.544-.42 3.544-3.88 0-3.459-2.564-3.878-3.544-3.878-.97 0-3.538.42-3.538 3.878zm14.432 1.11c0 1.937-1.172 2.77-3.03 2.77-.678 0-1.681-.165-2.34-.893-.4-.448-.555-1.049-.573-1.786v-4.886h1.568v4.782c0 1.03.597 1.479 1.317 1.479 1.057 0 1.487-.513 1.487-1.406v-4.855h1.572V81.6zm2.817.306c.014.41.22 1.19 1.564 1.19.727 0 1.54-.173 1.54-.956 0-.572-.554-.728-1.333-.912l-.792-.185c-1.194-.277-2.342-.54-2.342-2.162 0-.822.444-2.27 2.834-2.27 2.26 0 2.865 1.477 2.876 2.38h-1.48c-.04-.325-.164-1.108-1.509-1.108-.583 0-1.281.216-1.281.883 0 .578.472.696.777.768l1.798.442c1.006.247 1.928.658 1.928 1.981 0 2.22-2.256 2.413-2.904 2.413-2.687 0-3.148-1.55-3.148-2.464h1.472zm7.382 2.27h-1.535v-7.37h1.535v7.37zm6.15-7.37h1.436v7.37H83.49l-3.005-5.258h-.026v5.258h-1.436v-7.37h1.622l2.922 5.132h.026v-5.133zm6.588 3.397h3.077v3.973h-1.024l-.154-.923c-.39.447-.954 1.116-2.3 1.116-1.774 0-3.384-1.273-3.384-3.858 0-2.01 1.119-3.911 3.6-3.9 2.261 0 3.155 1.466 3.232 2.486H91.69c0-.288-.525-1.214-1.611-1.214-1.1 0-2.116.759-2.116 2.646 0 2.014 1.099 2.536 2.145 2.536.339 0 1.471-.131 1.786-1.622h-1.713v-1.24zM7.277 91.688c0-2.063 1.17-2.578 2-2.578.831 0 2 .515 2 2.578 0 2.061-1.169 2.578-2 2.578-.83 0-2-.517-2-2.578zm-1.54 0c0 3.457 2.566 3.883 3.54 3.883.976 0 3.541-.426 3.541-3.883 0-3.458-2.566-3.879-3.54-3.879-.975 0-3.54.421-3.54 3.879zm11.3-.248v-2.167h1.22c.954 0 1.356.3 1.356 1.019 0 .328 0 1.148-1.15 1.148h-1.427zm0 1.275H18.8c1.982 0 2.35-1.685 2.35-2.351 0-1.447-.86-2.361-2.288-2.361h-3.365v7.371h1.54v-2.659zm8.291-1.275v-2.167h1.22c.954 0 1.355.3 1.355 1.019 0 .328 0 1.148-1.148 1.148h-1.427zm0 1.275h1.766c1.98 0 2.35-1.685 2.35-2.351 0-1.447-.86-2.361-2.288-2.361h-3.368v7.371h1.54v-2.659zm7.966-1.027c0-2.063 1.167-2.578 2.002-2.578.827 0 2 .515 2 2.578 0 2.061-1.172 2.578-2 2.578-.835 0-2.002-.517-2.002-2.578zm-1.54 0c0 3.457 2.565 3.883 3.542 3.883.972 0 3.538-.426 3.538-3.883 0-3.458-2.566-3.879-3.538-3.879-.977 0-3.542.421-3.542 3.879zm11.27-.442v-1.973h1.917c.904 0 1.077.578 1.077.967 0 .73-.389 1.006-1.19 1.006h-1.804zm-1.513 4.129h1.513V92.49h1.588c1.14 0 1.203.388 1.203 1.394 0 .758.058 1.137.161 1.49h1.706v-.198c-.329-.122-.329-.39-.329-1.464 0-1.38-.328-1.603-.933-1.87.728-.245 1.137-.945 1.137-1.754 0-.638-.357-2.084-2.318-2.084h-3.728v7.37zm11.782 0h-1.539v-6.068h-2.226v-1.304h5.994v1.304h-2.229v6.068zm10.49-2.58c0 1.94-1.17 2.776-3.029 2.776-.674 0-1.68-.171-2.338-.898-.4-.45-.554-1.046-.572-1.784v-4.886h1.568v4.782c0 1.026.596 1.481 1.314 1.481 1.056 0 1.487-.517 1.487-1.409v-4.854h1.571v4.792zm7.45-4.792h1.44v7.372H71.13l-3.008-5.258h-.016v5.258h-1.44v-7.372h1.622l2.927 5.13h.018v-5.13zm5.783 7.372h-1.544v-7.372h1.544v7.372zm6.01 0h-1.539v-6.068h-2.223v-1.304h5.99v1.304h-2.228v6.068zm8.049 0h-1.543v-2.783l-2.542-4.589h1.815l1.53 3.204 1.46-3.204h1.742l-2.462 4.607v2.765zM49.63.03L.01 24.471v11.48h5.553v34.436h87.76V35.951h6.669V24.47L49.63.03zm32.956 59.985H16.302V28.544L49.63 11.51l32.956 17.033v31.472z"/><path d="M64.809 39.65H34.078V28.544h30.73V39.65zm0 15.93H34.078V44.466h30.73V55.58z"/></g></svg>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="79px" height="72px" viewBox="0 0 79 72" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 53.2 (72643) - https://sketchapp.com -->
4
+ <title>logo_portal</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <g id="logo_portal" fill="#2D82E8" fill-rule="nonzero">
8
+ <path d="M69.4,24.7 L69.3,24.7 L69.3,62.6 L9.6,62.6 L9.6,24.7 L39.5,10.5 L69.4,24.7 Z M51,30.2 L41.9,30.2 L41.9,49 L51,49 L51,30.2 Z M28,30.2 L28,49 L37.1,49 L37.1,30.2 L28,30.2 Z M69.4,67.3 L9.7,67.3 L4.9,72 L74.3,72 L69.4,67.3 Z M79,18.7 L39.5,0 L23.2,7.7 L23.2,0 L14.1,0 L14.1,12 L0,18.7 L4.8,21.7 L39.5,5.2 L74.2,21.7 L79,18.7 Z" id="Shape"></path>
9
+ </g>
10
+ </g>
11
+ </svg>
@@ -0,0 +1,157 @@
1
+ @import "../global/mixins.scss";
2
+
3
+ .button {
4
+ @apply relative;
5
+ @apply rounded;
6
+ @apply px-6;
7
+ @apply py-4;
8
+ @apply text-lg;
9
+ @apply text-center;
10
+ @apply uppercase;
11
+ @apply font-alt-sans;
12
+ @apply inline-block;
13
+ @apply tracking-widest;
14
+ @apply text-sm;
15
+ @apply font-bold;
16
+ @apply leading-snug;
17
+
18
+ &:focus {
19
+ outline: none;
20
+ box-shadow: 0 0 0 2px #fff, 0 0 3px 4px $tailwind-accent-cool;
21
+ }
22
+
23
+ &:hover {
24
+ @apply border-primary-dark;
25
+ }
26
+
27
+ &:disabled {
28
+ pointer-events: none;
29
+ @apply bg-white;
30
+ @apply border-gray-450;
31
+ @apply text-gray-450;
32
+ }
33
+
34
+ &.is-secondary {
35
+ @apply border-gray-700;
36
+ @apply text-gray-700;
37
+
38
+ &:hover {
39
+ @apply bg-gray-700;
40
+ @apply text-white;
41
+ }
42
+ }
43
+
44
+ &.is-small {
45
+ @apply text-xs;
46
+ @apply px-6;
47
+ @apply py-3;
48
+ }
49
+
50
+ &.is-big {
51
+ @apply px-6;
52
+ @apply py-6;
53
+ }
54
+
55
+ &.is-normal-case {
56
+ @apply normal-case;
57
+ }
58
+
59
+ &.is-unstyled {
60
+ background: transparent;
61
+ }
62
+
63
+ &.is-unstyled,
64
+ &.is-inline {
65
+ @apply normal-case;
66
+ @apply border-0;
67
+ @apply p-0;
68
+ @apply font-sans;
69
+ @apply tracking-normal;
70
+ @apply font-normal;
71
+ @apply underline;
72
+ @apply m-4;
73
+ @apply text-tiny;
74
+
75
+ &:hover {
76
+ @apply text-primary;
77
+ background: transparent;
78
+ }
79
+ }
80
+
81
+ &.is-inline {
82
+ @apply text-primary;
83
+ @apply font-semibold;
84
+ @apply text-tiny;
85
+ @apply m-0;
86
+ @apply no-underline;
87
+
88
+ &.has-icon-left {
89
+ .button__icon {
90
+ @apply mr-1;
91
+ }
92
+ }
93
+ &.has-icon-right {
94
+ .button__icon {
95
+ @apply ml-1;
96
+ }
97
+ }
98
+ }
99
+
100
+ &.has-icon-left {
101
+ .button__icon {
102
+ @apply mr-3;
103
+ }
104
+ }
105
+ &.has-icon-right {
106
+ .button__icon {
107
+ @apply ml-3;
108
+ }
109
+ }
110
+
111
+ &.is-text-caps {
112
+ @apply text-primary-dark;
113
+ @apply normal-case;
114
+ @apply border-0;
115
+ @apply p-0;
116
+ @apply font-sans;
117
+ @apply tracking-normal;
118
+ @apply font-normal;
119
+ @apply underline;
120
+ @apply m-4;
121
+ @apply uppercase;
122
+ @apply text-tiny;
123
+ @apply block;
124
+
125
+ &:hover {
126
+ @apply text-primary-dark;
127
+ background: transparent;
128
+ }
129
+ }
130
+
131
+ &.is-fullwidth {
132
+ @apply w-full;
133
+ }
134
+
135
+ &.is-loading {
136
+ .button__content {
137
+ opacity: 0;
138
+ }
139
+ }
140
+
141
+ @include filled-appearances;
142
+ @include outlined-appearances;
143
+ }
144
+
145
+ button {
146
+ &.has-toggle {
147
+ @include has-toggle;
148
+ }
149
+ }
150
+
151
+ .button__loader {
152
+ position: absolute;
153
+ top: 50%;
154
+ left: 50%;
155
+ transform: translate(-50%, -50%);
156
+ margin-top: 2px;
157
+ }
@@ -0,0 +1,80 @@
1
+ import * as React from "react"
2
+ import "./Button.scss"
3
+ import { AppearanceProps, classNamesForAppearanceTypes } from "../global/AppearanceTypes"
4
+ import { Icon, IconTypes } from "../icons/Icon"
5
+
6
+ export interface ButtonProps extends AppearanceProps {
7
+ id?: string
8
+ type?: "button" | "submit" | "reset"
9
+ children: React.ReactNode
10
+ onClick?: (e: React.MouseEvent) => void
11
+ icon?: IconTypes
12
+ iconPlacement?: "left" | "right"
13
+ // TODO: inlineIcon is deprecated
14
+ inlineIcon?: "left" | "right"
15
+ inline?: boolean
16
+ unstyled?: boolean
17
+ fullWidth?: boolean
18
+ className?: string
19
+ disabled?: boolean
20
+ loading?: boolean
21
+ }
22
+
23
+ export const buttonClassesForProps = (props: Omit<ButtonProps, "onClick">) => {
24
+ const classNames = ["button"].concat(classNamesForAppearanceTypes(props))
25
+ const inline = props.inline || props.inlineIcon
26
+ const iconPlacement = props.iconPlacement || props.inlineIcon || "right"
27
+
28
+ if (props.inlineIcon || props.icon) classNames.push(`has-icon-${iconPlacement}`)
29
+ if (inline) classNames.push("is-inline")
30
+ if (props.unstyled) classNames.push("is-unstyled")
31
+ if (props.fullWidth) classNames.push("is-fullwidth")
32
+ if (props.className) classNames.push(props.className)
33
+ if (props.loading) classNames.push("is-loading")
34
+ return classNames
35
+ }
36
+
37
+ export const buttonInner = (props: Omit<ButtonProps, "onClick">) => {
38
+ const iconSize = props.inline || props.inlineIcon ? "tiny" : "small"
39
+
40
+ if (props.icon) {
41
+ return props.inlineIcon == "left" || props.iconPlacement == "left" ? (
42
+ <>
43
+ <Icon className="button__icon" size={iconSize} symbol={props.icon} />
44
+ <span className="button__content">{props.children}</span>
45
+ </>
46
+ ) : (
47
+ <>
48
+ <span className="button__content">{props.children}</span>
49
+ <Icon className="button__icon" size={iconSize} symbol={props.icon} />
50
+ </>
51
+ )
52
+ } else if (props.loading) {
53
+ return (
54
+ <>
55
+ <Icon className="button__loader" size="large" symbol="spinner" />
56
+ <span className="button__content">{props.children}</span>
57
+ </>
58
+ )
59
+ } else {
60
+ return <>{props.children}</>
61
+ }
62
+ }
63
+
64
+ const Button = (props: ButtonProps) => {
65
+ const buttonClasses = buttonClassesForProps(props)
66
+
67
+ return (
68
+ <button
69
+ id={props.id}
70
+ type={props.type}
71
+ className={buttonClasses.join(" ")}
72
+ onClick={props.onClick}
73
+ disabled={props.disabled || props.loading}
74
+ >
75
+ {buttonInner(props)}
76
+ </button>
77
+ )
78
+ }
79
+
80
+ export { Button as default, Button }
@@ -0,0 +1,29 @@
1
+ import React, { useState } from "react"
2
+ import { t } from "@bloom-housing/ui-components"
3
+
4
+ type ExpandableContentProps = {
5
+ children: React.ReactChild
6
+ }
7
+
8
+ const ExpandableContent = ({ children }: ExpandableContentProps) => {
9
+ const [isExpanded, setExpanded] = useState(false)
10
+
11
+ return (
12
+ <div>
13
+ <button
14
+ type="button"
15
+ className="button is-unstyled m-0 no-underline has-toggle"
16
+ aria-expanded={isExpanded}
17
+ onClick={() => {
18
+ setExpanded(!isExpanded)
19
+ }}
20
+ >
21
+ {t(isExpanded ? "t.readLess" : "t.readMore")}
22
+ </button>
23
+
24
+ {isExpanded && <div className="mt-6">{children}</div>}
25
+ </div>
26
+ )
27
+ }
28
+
29
+ export { ExpandableContent as default, ExpandableContent }
@@ -0,0 +1,18 @@
1
+ .expandable-text {
2
+ p:not(:last-child),
3
+ ul:not(:last-child) {
4
+ margin-bottom: 0.9em;
5
+ }
6
+ ul {
7
+ list-style: disc;
8
+ margin-left: 1.4em;
9
+ }
10
+ }
11
+
12
+ .button-toggle {
13
+ @apply text-primary;
14
+ @apply cursor-pointer;
15
+ overflow-wrap: break-word;
16
+ word-wrap: break-word;
17
+ word-break: break-word;
18
+ }
@@ -0,0 +1,52 @@
1
+ import React, { useState } from "react"
2
+ import Markdown from "markdown-to-jsx"
3
+ import { t } from "../helpers/translator"
4
+ import "./ExpandableText.scss"
5
+
6
+ export interface ExpandableTextProps {
7
+ children: string
8
+ expand?: boolean
9
+ maxLength?: number
10
+ className?: string
11
+ }
12
+
13
+ const getText = (text: string, expanded: boolean, maxLength: number) => {
14
+ if (expanded || text.length <= maxLength) {
15
+ return text
16
+ }
17
+
18
+ let position = maxLength
19
+ while (text[position] != " " && position > 0) {
20
+ position -= 1
21
+ }
22
+ return position > 0 ? text.substring(0, position) + "..." : text.substring(0, maxLength) + "..."
23
+ }
24
+
25
+ const moreLessButton = (expanded: boolean, setExpanded: (newValue: boolean) => void) => {
26
+ return (
27
+ <span className="button-toggle" onClick={() => setExpanded(!expanded)}>
28
+ {expanded ? t("t.less") : t("t.more")}
29
+ </span>
30
+ )
31
+ }
32
+
33
+ const ExpandableText = (props: ExpandableTextProps) => {
34
+ const [expanded, setExpanded] = useState(props.expand || false)
35
+ const maxLength = props.maxLength || 350
36
+ let button
37
+
38
+ if (props.children.length > maxLength) {
39
+ button = moreLessButton(expanded, setExpanded)
40
+ }
41
+ return (
42
+ <div className={`expandable-text ${props.className}`}>
43
+ <Markdown
44
+ children={getText(props.children, expanded, maxLength)}
45
+ options={{ disableParsingRawHTML: true }}
46
+ />
47
+ {button}
48
+ </div>
49
+ )
50
+ }
51
+
52
+ export { ExpandableText as default, ExpandableText }
@@ -0,0 +1,30 @@
1
+ import React, { useContext } from "react"
2
+ import "./Button.scss"
3
+ import { buttonClassesForProps, buttonInner, ButtonProps } from "./Button"
4
+ import { NavigationContext } from "../config/NavigationContext"
5
+ import { isExternalLink } from "../helpers/links"
6
+
7
+ export interface LinkButtonProps extends Omit<ButtonProps, "onClick"> {
8
+ href: string
9
+ }
10
+
11
+ const LinkButton = (props: LinkButtonProps) => {
12
+ const { LinkComponent } = useContext(NavigationContext)
13
+ const buttonClasses = buttonClassesForProps(props)
14
+
15
+ if (isExternalLink(props.href)) {
16
+ return (
17
+ <a href={props.href} className={buttonClasses.join(" ")}>
18
+ {buttonInner(props)}
19
+ </a>
20
+ )
21
+ } else {
22
+ return (
23
+ <LinkComponent href={props.href} className={buttonClasses.join(" ")}>
24
+ {buttonInner(props)}
25
+ </LinkComponent>
26
+ )
27
+ }
28
+ }
29
+
30
+ export { LinkButton as default, LinkButton }
@@ -0,0 +1,11 @@
1
+ import React, { PropsWithChildren, useContext } from "react"
2
+ import { LinkProps, NavigationContext } from "../config/NavigationContext"
3
+
4
+ // Legacy use only, deprecated
5
+ const LocalizedLink = (props: PropsWithChildren<LinkProps>) => {
6
+ const { LinkComponent } = useContext(NavigationContext)
7
+
8
+ return <LinkComponent {...props}>{props.children}</LinkComponent>
9
+ }
10
+
11
+ export { LocalizedLink as default, LocalizedLink }
@@ -0,0 +1,327 @@
1
+ import {
2
+ ApplicationsService,
3
+ ApplicationFlaggedSetsService,
4
+ AuthService,
5
+ ListingsService,
6
+ User,
7
+ UserBasic,
8
+ UserCreate,
9
+ UserService,
10
+ serviceOptions,
11
+ Status,
12
+ AmiChartsService,
13
+ ReservedCommunityTypesService,
14
+ UnitAccessibilityPriorityTypesService,
15
+ UnitTypesService,
16
+ PreferencesService,
17
+ } from "@bloom-housing/backend-core/types"
18
+ import {
19
+ createContext,
20
+ createElement,
21
+ FunctionComponent,
22
+ useContext,
23
+ useEffect,
24
+ useMemo,
25
+ useReducer,
26
+ } from "react"
27
+ import qs from "qs"
28
+ import axiosStatic from "axios"
29
+ import { ConfigContext } from "../config/ConfigContext"
30
+ import { createAction, createReducer } from "typesafe-actions"
31
+ import { clearToken, getToken, getTokenTtl, setToken } from "./token"
32
+ import { NavigationContext } from "../config/NavigationContext"
33
+
34
+ type ContextProps = {
35
+ amiChartsService: AmiChartsService
36
+ applicationsService: ApplicationsService
37
+ applicationFlaggedSetsService: ApplicationFlaggedSetsService
38
+ listingsService: ListingsService
39
+ userService: UserService
40
+ authService: AuthService
41
+ preferencesService: PreferencesService
42
+ reservedCommunityTypeService: ReservedCommunityTypesService
43
+ unitPriorityService: UnitAccessibilityPriorityTypesService
44
+ unitTypesService: UnitTypesService
45
+ login: (email: string, password: string) => Promise<User | undefined>
46
+ resetPassword: (
47
+ token: string,
48
+ password: string,
49
+ passwordConfirmation: string
50
+ ) => Promise<User | undefined>
51
+ signOut: () => void
52
+ confirmAccount: (token: string) => Promise<User | undefined>
53
+ forgotPassword: (email: string) => Promise<string | undefined>
54
+ createUser: (user: UserCreate) => Promise<UserBasic | undefined>
55
+ resendConfirmation: (email: string) => Promise<Status | undefined>
56
+ accessToken?: string
57
+ initialStateLoaded: boolean
58
+ loading: boolean
59
+ profile?: User
60
+ }
61
+
62
+ // Internal Provider State
63
+ type AuthState = {
64
+ accessToken?: string
65
+ initialStateLoaded: boolean
66
+ language?: string
67
+ loading: boolean
68
+ profile?: User
69
+ refreshTimer?: number
70
+ storageType: string
71
+ }
72
+
73
+ type DispatchType = (...arg: [unknown]) => void
74
+
75
+ // State Mutation Actions
76
+ const saveToken = createAction("SAVE_TOKEN")<{
77
+ apiUrl: string
78
+ accessToken: string
79
+ dispatch: DispatchType
80
+ }>()
81
+ const saveProfile = createAction("SAVE_PROFILE")<User>()
82
+ const startLoading = createAction("START_LOADING")()
83
+ const stopLoading = createAction("STOP_LOADING")()
84
+ const signOut = createAction("SIGN_OUT")()
85
+
86
+ const scheduleTokenRefresh = (accessToken: string, onRefresh: (accessToken: string) => void) => {
87
+ const ttl = getTokenTtl(accessToken)
88
+
89
+ if (ttl < 0) {
90
+ // If ttl is negative, then our token is already expired, we'll have to re-login to get a new token.
91
+ //dispatch(signOut())
92
+ return null
93
+ } else {
94
+ // Queue up a refresh for ~1 minute before the token expires
95
+ return (setTimeout(() => {
96
+ const run = async () => {
97
+ const reposne = await new AuthService().token()
98
+ if (reposne) {
99
+ onRefresh(reposne.accessToken)
100
+ }
101
+ }
102
+ void run()
103
+ }, Math.max(ttl - 60000, 0)) as unknown) as number
104
+ }
105
+ }
106
+ const reducer = createReducer(
107
+ {
108
+ loading: false,
109
+ initialStateLoaded: false,
110
+ storageType: "session",
111
+ language: "en",
112
+ } as AuthState,
113
+ {
114
+ SAVE_TOKEN: (state, { payload }) => {
115
+ const { refreshTimer: oldRefresh, ...rest } = state
116
+ const { accessToken, apiUrl, dispatch } = payload
117
+
118
+ // If an existing refresh timer has been defined, remove it as the access token has changed
119
+ if (oldRefresh) {
120
+ clearTimeout(oldRefresh)
121
+ }
122
+
123
+ // Save off the token in local storage for persistence across reloads.
124
+ setToken(state.storageType, accessToken)
125
+
126
+ const refreshTimer = scheduleTokenRefresh(accessToken, (newAccessToken) =>
127
+ dispatch(saveToken({ apiUrl, accessToken: newAccessToken, dispatch }))
128
+ )
129
+ serviceOptions.axios = axiosStatic.create({
130
+ baseURL: apiUrl,
131
+ headers: {
132
+ language: state.language,
133
+ jurisdictionName: process.env.jurisdictionName,
134
+ ...(accessToken && { Authorization: `Bearer ${accessToken}` }),
135
+ },
136
+ })
137
+
138
+ return {
139
+ ...rest,
140
+ ...(refreshTimer && { refreshTimer }),
141
+ accessToken: accessToken,
142
+ }
143
+ },
144
+ SAVE_PROFILE: (state, { payload: user }) => ({ ...state, profile: user }),
145
+ START_LOADING: (state) => ({ ...state, loading: true }),
146
+ END_LOADING: (state) => ({ ...state, loading: false }),
147
+ SIGN_OUT: ({ storageType }) => {
148
+ clearToken(storageType)
149
+ // Clear out all existing state other than the storage type
150
+ return { loading: false, storageType, initialStateLoaded: true }
151
+ },
152
+ }
153
+ )
154
+
155
+ export const AuthContext = createContext<Partial<ContextProps>>({})
156
+ export const AuthProvider: FunctionComponent = ({ children }) => {
157
+ const { apiUrl, storageType } = useContext(ConfigContext)
158
+ const { router } = useContext(NavigationContext)
159
+ const [state, dispatch] = useReducer(reducer, {
160
+ loading: false,
161
+ initialStateLoaded: false,
162
+ storageType,
163
+ language: router.locale,
164
+ })
165
+
166
+ const userService = useMemo(() => new UserService(), [])
167
+ const authService = new AuthService()
168
+
169
+ useEffect(() => {
170
+ serviceOptions.axios = axiosStatic.create({
171
+ baseURL: apiUrl,
172
+ headers: {
173
+ language: router.locale,
174
+ jurisdictionName: process.env.jurisdictionName,
175
+ appUrl: window.location.origin,
176
+ ...(state.accessToken && { Authorization: `Bearer ${state.accessToken}` }),
177
+ },
178
+ paramsSerializer: (params) => {
179
+ return qs.stringify(params)
180
+ },
181
+ })
182
+ }, [router, apiUrl, state.accessToken, router.locale])
183
+
184
+ // On initial load/reload, check localStorage to see if we have a token available
185
+ useEffect(() => {
186
+ const accessToken = getToken(storageType)
187
+ if (accessToken) {
188
+ const ttl = getTokenTtl(accessToken)
189
+
190
+ if (ttl > 0) {
191
+ dispatch(saveToken({ accessToken, apiUrl, dispatch }))
192
+ } else {
193
+ dispatch(signOut())
194
+ }
195
+ } else {
196
+ dispatch(signOut())
197
+ }
198
+ }, [apiUrl, storageType])
199
+
200
+ // Load our profile as soon as we have an access token available
201
+ useEffect(() => {
202
+ if (!state.profile && state.accessToken && !state.loading) {
203
+ const loadProfile = async () => {
204
+ dispatch(startLoading())
205
+ try {
206
+ const profile = await userService?.userControllerProfile()
207
+ if (profile) {
208
+ dispatch(saveProfile(profile))
209
+ }
210
+ } finally {
211
+ dispatch(stopLoading())
212
+ }
213
+ }
214
+ void loadProfile()
215
+ }
216
+ }, [state.profile, state.accessToken, apiUrl, userService, state.loading])
217
+
218
+ const contextValues: ContextProps = {
219
+ amiChartsService: new AmiChartsService(),
220
+ applicationsService: new ApplicationsService(),
221
+ applicationFlaggedSetsService: new ApplicationFlaggedSetsService(),
222
+ listingsService: new ListingsService(),
223
+ userService: new UserService(),
224
+ authService: new AuthService(),
225
+ preferencesService: new PreferencesService(),
226
+ reservedCommunityTypeService: new ReservedCommunityTypesService(),
227
+ unitPriorityService: new UnitAccessibilityPriorityTypesService(),
228
+ unitTypesService: new UnitTypesService(),
229
+ loading: state.loading,
230
+ accessToken: state.accessToken,
231
+ initialStateLoaded: state.initialStateLoaded,
232
+ profile: state.profile,
233
+ login: async (email, password) => {
234
+ dispatch(signOut())
235
+ dispatch(startLoading())
236
+ try {
237
+ const response = await authService?.login({ body: { email, password } })
238
+ if (response) {
239
+ dispatch(saveToken({ accessToken: response.accessToken, apiUrl, dispatch }))
240
+ const profile = await userService?.userControllerProfile()
241
+ if (profile) {
242
+ dispatch(saveProfile(profile))
243
+ return profile
244
+ }
245
+ }
246
+ return undefined
247
+ } finally {
248
+ dispatch(stopLoading())
249
+ }
250
+ },
251
+ signOut: () => dispatch(signOut()),
252
+ resetPassword: async (token, password, passwordConfirmation) => {
253
+ dispatch(startLoading())
254
+ try {
255
+ const response = await userService?.updatePassword({
256
+ body: {
257
+ token,
258
+ password,
259
+ passwordConfirmation,
260
+ },
261
+ })
262
+ if (response) {
263
+ dispatch(saveToken({ accessToken: response.accessToken, apiUrl, dispatch }))
264
+ const profile = await userService?.userControllerProfile()
265
+ if (profile) {
266
+ dispatch(saveProfile(profile))
267
+ return profile
268
+ }
269
+ }
270
+ return undefined
271
+ } finally {
272
+ dispatch(stopLoading())
273
+ }
274
+ },
275
+ confirmAccount: async (token) => {
276
+ dispatch(startLoading())
277
+ try {
278
+ const response = await userService?.confirm({ body: { token } })
279
+ if (response) {
280
+ dispatch(saveToken({ accessToken: response.accessToken, apiUrl, dispatch }))
281
+ const profile = await userService?.userControllerProfile()
282
+ if (profile) {
283
+ dispatch(saveProfile(profile))
284
+ return profile
285
+ }
286
+ }
287
+ return undefined
288
+ } finally {
289
+ dispatch(stopLoading())
290
+ }
291
+ },
292
+ createUser: async (user: UserCreate) => {
293
+ dispatch(startLoading())
294
+ try {
295
+ const response = await userService?.create({
296
+ body: { ...user, appUrl: window.location.origin },
297
+ })
298
+ return response
299
+ } finally {
300
+ dispatch(stopLoading())
301
+ }
302
+ },
303
+ resendConfirmation: async (email: string) => {
304
+ dispatch(startLoading())
305
+ try {
306
+ const response = await userService?.resendConfirmation({
307
+ body: { email, appUrl: window.location.origin },
308
+ })
309
+ return response
310
+ } finally {
311
+ dispatch(stopLoading())
312
+ }
313
+ },
314
+ forgotPassword: async (email) => {
315
+ dispatch(startLoading())
316
+ try {
317
+ const response = await userService?.forgotPassword({
318
+ body: { email, appUrl: window.location.origin },
319
+ })
320
+ return response?.message
321
+ } finally {
322
+ dispatch(stopLoading())
323
+ }
324
+ },
325
+ }
326
+ return createElement(AuthContext.Provider, { value: contextValues }, children)
327
+ }