@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,94 @@
1
+ import * as React from "react"
2
+ import { t } from "../../../helpers/translator"
3
+ import { Listing } from "@bloom-housing/backend-core/types"
4
+
5
+ const WaitlistItem = (props: { className?: string; value: number; text: string }) => (
6
+ <li className={`uppercase text-gray-800 text-tiny ${props.className}`}>
7
+ <span className="text-right w-12 inline-block pr-2">{props.value}</span>
8
+ <span>{props.text}</span>
9
+ </li>
10
+ )
11
+
12
+ export interface WaitlistProps {
13
+ listing: Listing
14
+ }
15
+
16
+ const Waitlist = (props: WaitlistProps) => {
17
+ const listing = props.listing
18
+ const showWaitlistValues =
19
+ listing.waitlistMaxSize !== undefined &&
20
+ listing.waitlistMaxSize !== null &&
21
+ listing.waitlistCurrentSize !== undefined &&
22
+ listing.waitlistCurrentSize !== null &&
23
+ listing.waitlistOpenSpots !== undefined &&
24
+ listing.waitlistOpenSpots !== null
25
+ let header, subheader, waitlistItems
26
+
27
+ if (listing?.unitsAvailable && listing.unitsAvailable > 0 && listing.isWaitlistOpen) {
28
+ header = t("listings.waitlist.unitsAndWaitlist")
29
+ subheader = t("listings.waitlist.submitAnApplication")
30
+ waitlistItems = (
31
+ <>
32
+ {showWaitlistValues && (
33
+ <>
34
+ <WaitlistItem
35
+ value={listing.unitsAvailable}
36
+ text={t("listings.availableUnits")}
37
+ className={"font-semibold"}
38
+ />
39
+ {listing.waitlistOpenSpots && (
40
+ <WaitlistItem
41
+ value={listing.waitlistOpenSpots}
42
+ text={t("listings.waitlist.openSlots")}
43
+ className={"font-semibold"}
44
+ />
45
+ )}
46
+ </>
47
+ )}
48
+ </>
49
+ )
50
+ } else {
51
+ if (listing.isWaitlistOpen) {
52
+ header = t("listings.waitlist.isOpen")
53
+ subheader = t("listings.waitlist.submitForWaitlist")
54
+ } else {
55
+ header = t("listings.waitlist.closed")
56
+ subheader = null
57
+ }
58
+ waitlistItems = (
59
+ <>
60
+ {showWaitlistValues && (
61
+ <>
62
+ <WaitlistItem
63
+ value={listing.waitlistCurrentSize || 0}
64
+ text={t("listings.waitlist.currentSize")}
65
+ />
66
+ {listing.waitlistOpenSpots && (
67
+ <WaitlistItem
68
+ value={listing.waitlistOpenSpots}
69
+ text={t("listings.waitlist.openSlots")}
70
+ className={"font-semibold"}
71
+ />
72
+ )}
73
+ <WaitlistItem
74
+ value={listing.waitlistMaxSize || 0}
75
+ text={t("listings.waitlist.finalSize")}
76
+ />
77
+ </>
78
+ )}
79
+ </>
80
+ )
81
+ }
82
+
83
+ return (
84
+ <>
85
+ <h4 className="text-caps-tiny">{header}</h4>
86
+ <div>
87
+ {subheader && <p className="text-tiny text-gray-800 pb-3">{subheader}</p>}
88
+ {showWaitlistValues && <ul>{waitlistItems}</ul>}
89
+ </div>
90
+ </>
91
+ )
92
+ }
93
+
94
+ export { Waitlist as default, Waitlist }
@@ -0,0 +1,22 @@
1
+ import * as React from "react"
2
+ import { t } from "../../../helpers/translator"
3
+ import { Listing } from "@bloom-housing/backend-core/types"
4
+
5
+ interface WhatToExpectProps {
6
+ listing: Listing
7
+ }
8
+
9
+ const WhatToExpect = (props: WhatToExpectProps) => {
10
+ const listing = props.listing
11
+
12
+ return (
13
+ <section className="aside-block">
14
+ <h4 className="text-caps-underline">{t("whatToExpect.label")}</h4>
15
+ <p className="text-tiny text-gray-800">
16
+ {listing.whatToExpect ? listing.whatToExpect : t("whatToExpect.default")}
17
+ </p>
18
+ </section>
19
+ )
20
+ }
21
+
22
+ export { WhatToExpect as default, WhatToExpect }
@@ -0,0 +1,34 @@
1
+ import * as React from "react"
2
+ import { ListingEvent, ListingEventType } from "@bloom-housing/backend-core/types"
3
+ import { t } from "../../../../helpers/translator"
4
+ import { pdfUrlFromListingEvents } from "../../../../helpers/pdfs"
5
+ import moment from "moment"
6
+
7
+ const DownloadLotteryResults = (props: { event: ListingEvent; cloudName: string }) => {
8
+ const { event, cloudName } = props
9
+ const eventUrl = event
10
+ ? pdfUrlFromListingEvents([event], ListingEventType.lotteryResults, cloudName)
11
+ : null
12
+ return (
13
+ <>
14
+ {eventUrl && (
15
+ <section className="aside-block text-center">
16
+ <h2 className="text-caps pb-4">{t("listings.lotteryResults.header")}</h2>
17
+ <p className="uppercase text-gray-800 text-tiny font-semibold pb-4">
18
+ {moment(event.startTime).format("MMMM D, YYYY")}
19
+ </p>
20
+ <a
21
+ className="button is-primary w-full mb-2"
22
+ href={eventUrl}
23
+ title={t("listings.lotteryResults.downloadResults")}
24
+ target="_blank"
25
+ >
26
+ {t("listings.lotteryResults.downloadResults")}
27
+ </a>
28
+ </section>
29
+ )}
30
+ </>
31
+ )
32
+ }
33
+
34
+ export { DownloadLotteryResults as default, DownloadLotteryResults }
@@ -0,0 +1,24 @@
1
+ import * as React from "react"
2
+ import { ListingEvent } from "@bloom-housing/backend-core/types"
3
+ import moment from "moment"
4
+
5
+ const EventDateSection = (props: { event: ListingEvent }) => {
6
+ return (
7
+ <>
8
+ {props.event.startTime && (
9
+ <p className="text text-gray-800 pb-3 flex justify-between items-center">
10
+ <span className="inline-block text-tiny uppercase">
11
+ {moment(props.event.startTime).format("MMMM D, YYYY")}
12
+ </span>
13
+ <span className="inline-block text-sm font-bold">
14
+ {moment(props.event.startTime).format("hh:mma") +
15
+ "-" +
16
+ moment(props.event.endTime).format("hh:mma")}
17
+ </span>
18
+ </p>
19
+ )}
20
+ </>
21
+ )
22
+ }
23
+
24
+ export { EventDateSection as default, EventDateSection }
@@ -0,0 +1,26 @@
1
+ import * as React from "react"
2
+ import { ListingEvent } from "@bloom-housing/backend-core/types"
3
+ import { t } from "../../../../helpers/translator"
4
+ import moment from "moment"
5
+
6
+ const LotteryResultsEvent = (props: { event: ListingEvent }) => {
7
+ const { event } = props
8
+ return (
9
+ <section className="aside-block">
10
+ <h4 className="text-caps-underline">{t("listings.lotteryResults.header")}</h4>
11
+ <p className="text text-gray-800 pb-3 flex justify-between items-center">
12
+ <span className="inline-block">{moment(props.event.startTime).format("MMMM D, YYYY")}</span>
13
+ </p>
14
+ {event.note && <p className="text text-gray-600">{event.note}</p>}
15
+ {!event.note && (
16
+ <p className="text-tiny text-gray-600">
17
+ {t("listings.lotteryResults.completeResultsWillBePosted", {
18
+ hour: moment(props.event.startTime).format("h a"),
19
+ })}
20
+ </p>
21
+ )}
22
+ </section>
23
+ )
24
+ }
25
+
26
+ export { LotteryResultsEvent as default, LotteryResultsEvent }
@@ -0,0 +1,27 @@
1
+ import * as React from "react"
2
+ import { ListingEvent } from "@bloom-housing/backend-core/types"
3
+ import { EventDateSection } from "./EventDateSection"
4
+ import { t } from "../../../../helpers/translator"
5
+
6
+ const OpenHouseEvent = (props: { events: ListingEvent[] }) => {
7
+ return (
8
+ <section className="aside-block">
9
+ <h4 className="text-caps-tiny">{t("listings.openHouseEvent.header")}</h4>
10
+ {props.events.map((openHouseEvent, index) => (
11
+ <div key={`openHouses-${index}`}>
12
+ <EventDateSection event={openHouseEvent} />
13
+ {openHouseEvent.url && (
14
+ <p className="text text-gray-800 pb-3">
15
+ <a href={openHouseEvent.url}>
16
+ {openHouseEvent.label || t("listings.openHouseEvent.seeVideo")}
17
+ </a>
18
+ </p>
19
+ )}
20
+ {openHouseEvent.note && <p className="text-tiny text-gray-600">{openHouseEvent.note}</p>}
21
+ </div>
22
+ ))}
23
+ </section>
24
+ )
25
+ }
26
+
27
+ export { OpenHouseEvent as default, OpenHouseEvent }
@@ -0,0 +1,22 @@
1
+ import * as React from "react"
2
+ import { ListingEvent } from "@bloom-housing/backend-core/types"
3
+ import { t } from "../../../../helpers/translator"
4
+ import { EventDateSection } from "./EventDateSection"
5
+
6
+ const PublicLotteryEvent = (props: { event: ListingEvent }) => {
7
+ const { event } = props
8
+ return (
9
+ <section className="aside-block">
10
+ <h4 className="text-caps-underline">{t("listings.publicLottery.header")}</h4>
11
+ <EventDateSection event={props.event} />
12
+ {event.url && (
13
+ <p className="text text-gray-800 pb-3">
14
+ <a href={event.url}>{t("listings.publicLottery.seeVideo")}</a>
15
+ </p>
16
+ )}
17
+ {event.note && <p className="text-tiny text-gray-600">{event.note}</p>}
18
+ </section>
19
+ )
20
+ }
21
+
22
+ export { PublicLotteryEvent as default, PublicLotteryEvent }
@@ -0,0 +1,64 @@
1
+ .app-card {
2
+ @apply p-0;
3
+ @apply mb-0;
4
+ @apply rounded-lg;
5
+ @apply border-solid;
6
+ @apply border;
7
+ @apply border-gray-450;
8
+ }
9
+
10
+ .app-card__header,
11
+ .app-card__section {
12
+ @apply py-8;
13
+ @apply mx-8;
14
+ }
15
+
16
+ .app-card__header {
17
+ @screen md {
18
+ @apply pb-4;
19
+ }
20
+
21
+ &.border-bottom {
22
+ @apply border-solid;
23
+ @apply border-b;
24
+ @apply border-gray-450;
25
+ }
26
+ }
27
+
28
+ .app-card__section {
29
+ }
30
+
31
+ .app-card__back {
32
+ @apply font-semibold;
33
+ @apply text-tiny;
34
+ @apply mb-4;
35
+ }
36
+
37
+ .app-card__question {
38
+ @apply text-2xl;
39
+ @apply mb-2;
40
+ @apply text-center;
41
+ }
42
+
43
+ .app-card__note {
44
+ @apply font-semibold;
45
+ @apply text-tiny;
46
+ @apply text-gray-700;
47
+ @apply pb-4;
48
+ }
49
+
50
+ .app-card__sub-header {
51
+ @apply py-4;
52
+ @apply px-8;
53
+ @apply bg-gray-300;
54
+ @apply flex;
55
+ @apply justify-between;
56
+
57
+ .edit-link {
58
+ @apply self-center;
59
+ }
60
+ }
61
+
62
+ .app-card__sub-title {
63
+ @apply mb-0;
64
+ }
@@ -0,0 +1,19 @@
1
+ .back {
2
+ @apply flex;
3
+ @apply tracking-wider;
4
+ @apply font-semibold;
5
+ @apply items-center;
6
+ line-height: 1rem;
7
+
8
+ a {
9
+ @apply flex;
10
+ @apply self-center;
11
+
12
+ &:before {
13
+ content: "\2039";
14
+ @apply text-xl;
15
+ @apply px-2;
16
+ line-height: 0.75rem;
17
+ }
18
+ }
19
+ }
@@ -0,0 +1,6 @@
1
+ .button-group__item {
2
+ .button {
3
+ @apply block;
4
+ @apply w-full;
5
+ }
6
+ }
@@ -0,0 +1,22 @@
1
+ .button-pager {
2
+ @apply text-center;
3
+
4
+ button,
5
+ .button {
6
+ @apply mb-0;
7
+ }
8
+ }
9
+
10
+ .button-pager__row {
11
+ @apply py-2;
12
+ @apply px-8;
13
+
14
+ @screen md {
15
+ @apply py-4;
16
+ }
17
+
18
+ &.primary {
19
+ @apply bg-primary-lighter;
20
+ @apply pb-8;
21
+ }
22
+ }
@@ -0,0 +1,35 @@
1
+ .field-section {
2
+ @apply border-b;
3
+ @apply mb-8;
4
+ @apply pb-8;
5
+ }
6
+
7
+ .field-section__header {
8
+ @apply mb-6;
9
+ @apply flex;
10
+ @apply items-center;
11
+ }
12
+
13
+ .field-section__title {
14
+ @apply font-alt-sans;
15
+ @apply text-xl;
16
+ @apply inline-block;
17
+ }
18
+
19
+ .field-group__title {
20
+ @apply font-alt-sans;
21
+ @apply text-lg;
22
+ @apply mb-6;
23
+ }
24
+
25
+ .field-grid {
26
+ .field {
27
+ @apply mb-0;
28
+ }
29
+
30
+ &.demo {
31
+ .field {
32
+ @apply bg-gray-200;
33
+ }
34
+ }
35
+ }
@@ -0,0 +1,31 @@
1
+ import * as React from "react"
2
+ import "./FieldSection.scss"
3
+
4
+ export interface FieldSectionProps {
5
+ title?: string
6
+ className?: string
7
+ tinted?: boolean
8
+ insetGrid?: boolean
9
+ children: React.ReactNode
10
+ }
11
+
12
+ const FieldSection = (props: FieldSectionProps) => {
13
+ const fieldGridClasses = ["field-section__grid"]
14
+ if (props.tinted) fieldGridClasses.push("is-tinted")
15
+ if (props.insetGrid) fieldGridClasses.push("is-inset")
16
+ if (props.className) fieldGridClasses.push(props.className)
17
+
18
+ return (
19
+ <div className="field-section">
20
+ {props.title && (
21
+ <header className="field-section__header">
22
+ <h2 className="field-section__title">{props.title}</h2>
23
+ </header>
24
+ )}
25
+
26
+ <div className={fieldGridClasses.join(" ")}>{props.children}</div>
27
+ </div>
28
+ )
29
+ }
30
+
31
+ export { FieldSection as default, FieldSection }