@bloom-housing/ui-components 3.0.1-alpha.40 → 3.0.1-alpha.46

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,51 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [3.0.1-alpha.46](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@3.0.1-alpha.45...@bloom-housing/ui-components@3.0.1-alpha.46) (2021-12-15)
7
+
8
+ **Note:** Version bump only for package @bloom-housing/ui-components
9
+
10
+
11
+
12
+
13
+
14
+ ## [3.0.1-alpha.45](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@3.0.1-alpha.44...@bloom-housing/ui-components@3.0.1-alpha.45) (2021-12-14)
15
+
16
+ **Note:** Version bump only for package @bloom-housing/ui-components
17
+
18
+
19
+
20
+
21
+
22
+ ## [3.0.1-alpha.44](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@3.0.1-alpha.43...@bloom-housing/ui-components@3.0.1-alpha.44) (2021-12-14)
23
+
24
+ **Note:** Version bump only for package @bloom-housing/ui-components
25
+
26
+
27
+
28
+
29
+
30
+ ## [3.0.1-alpha.43](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@3.0.1-alpha.42...@bloom-housing/ui-components@3.0.1-alpha.43) (2021-12-13)
31
+
32
+ **Note:** Version bump only for package @bloom-housing/ui-components
33
+
34
+
35
+
36
+
37
+
38
+ ## [3.0.1-alpha.42](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@3.0.1-alpha.40...@bloom-housing/ui-components@3.0.1-alpha.42) (2021-12-13)
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * fix hero button width with secondary button ([#2306](https://github.com/bloom-housing/bloom/issues/2306)) ([929ac8e](https://github.com/bloom-housing/bloom/commit/929ac8e7fd30718a77a10277323abf1604a45a19))
44
+ * mobile notice text wrap issue ([#2308](https://github.com/bloom-housing/bloom/issues/2308)) ([47fdd7e](https://github.com/bloom-housing/bloom/commit/47fdd7ea0e15ec50888cb00f1caa11df269c9e84))
45
+ * versioning issues ([#2311](https://github.com/bloom-housing/bloom/issues/2311)) ([0b1d143](https://github.com/bloom-housing/bloom/commit/0b1d143ab8b17add9d52533560f28d7a1f6dfd3d))
46
+
47
+
48
+
49
+
50
+
6
51
  ## [3.0.1-alpha.40](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@3.0.1-alpha.39...@bloom-housing/ui-components@3.0.1-alpha.40) (2021-12-10)
7
52
 
8
53
  **Note:** Version bump only for package @bloom-housing/ui-components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bloom-housing/ui-components",
3
- "version": "3.0.1-alpha.40",
3
+ "version": "3.0.1-alpha.46",
4
4
  "author": "Sean Albert <sean.albert@exygy.com>",
5
5
  "description": "Shared user interface components for Bloom affordable housing system",
6
6
  "homepage": "https://github.com/bloom-housing/bloom/tree/master/shared/ui-components",
@@ -69,7 +69,7 @@
69
69
  "webpack": "^4.44.2"
70
70
  },
71
71
  "dependencies": {
72
- "@bloom-housing/backend-core": "^3.0.1-alpha.35",
72
+ "@bloom-housing/backend-core": "^3.0.1-alpha.39",
73
73
  "@mapbox/mapbox-sdk": "^0.13.0",
74
74
  "@types/body-scroll-lock": "^2.6.1",
75
75
  "@types/jwt-decode": "^2.2.1",
@@ -100,5 +100,5 @@
100
100
  "tailwindcss": "2.2.10",
101
101
  "typesafe-actions": "^5.1.0"
102
102
  },
103
- "gitHead": "66128b887f8eef065184137a00d2d3ed31d31ed9"
103
+ "gitHead": "4f1b763f728ca4651cd973f21b30e07a69f1a2e7"
104
104
  }
@@ -10,6 +10,7 @@ export interface ViewItemProps {
10
10
  className?: string
11
11
  truncated?: boolean
12
12
  error?: boolean
13
+ dataTestId?: string
13
14
  }
14
15
 
15
16
  const ViewItem = (props: ViewItemProps) => {
@@ -22,7 +23,7 @@ const ViewItem = (props: ViewItemProps) => {
22
23
  if (props.truncated) valueClassName += " is-truncated"
23
24
 
24
25
  return (
25
- <div id={props.id} className={viewItemClasses.join(" ")}>
26
+ <div id={props.id} className={viewItemClasses.join(" ")} data-test-id={props.dataTestId}>
26
27
  {props.label && (
27
28
  <span className={`view-item__label ${props.error ? "text-alert text-tiny" : ""}`}>
28
29
  {props.label}
@@ -24,6 +24,7 @@ export interface DateFieldProps {
24
24
  register: UseFormMethods["register"]
25
25
  required?: boolean
26
26
  watch: UseFormMethods["watch"]
27
+ dataTestId?: string
27
28
  }
28
29
 
29
30
  const DateField = (props: DateFieldProps) => {
@@ -60,6 +61,7 @@ const DateField = (props: DateFieldProps) => {
60
61
  }}
61
62
  inputProps={{ maxLength: 2 }}
62
63
  register={register}
64
+ dataTestId={props.dataTestId ? `${props.dataTestId}-month` : undefined}
63
65
  />
64
66
  <Field
65
67
  name={getFieldName("day")}
@@ -80,6 +82,7 @@ const DateField = (props: DateFieldProps) => {
80
82
  }}
81
83
  inputProps={{ maxLength: 2 }}
82
84
  register={register}
85
+ dataTestId={props.dataTestId ? `${props.dataTestId}-day` : undefined}
83
86
  />
84
87
  <Field
85
88
  name={getFieldName("year")}
@@ -102,6 +105,7 @@ const DateField = (props: DateFieldProps) => {
102
105
  }}
103
106
  inputProps={{ maxLength: 4 }}
104
107
  register={register}
108
+ dataTestId={props.dataTestId ? `${props.dataTestId}-year` : undefined}
105
109
  />
106
110
  </div>
107
111
  {props.note && <p className="field-note mb-2 mt-4">{props.note}</p>}
@@ -28,6 +28,7 @@ export type TimeFieldProps = {
28
28
  required?: boolean
29
29
  watch: UseFormMethods["watch"]
30
30
  seconds?: boolean
31
+ dataTestId?: string
31
32
  }
32
33
 
33
34
  export const formatDateToTimeField = (date: Date) => {
@@ -54,6 +55,7 @@ const TimeField = ({
54
55
  seconds,
55
56
  defaultValues,
56
57
  disabled,
58
+ dataTestId,
57
59
  }: TimeFieldProps) => {
58
60
  const fieldName = (baseName: string) => {
59
61
  return [name, baseName].filter((item) => item).join(".")
@@ -99,6 +101,7 @@ const TimeField = ({
99
101
  register={register}
100
102
  describedBy={`${id}-error`}
101
103
  disabled={disabled}
104
+ dataTestId={dataTestId ? `${dataTestId}-hours` : undefined}
102
105
  />
103
106
 
104
107
  <Field
@@ -122,6 +125,7 @@ const TimeField = ({
122
125
  register={register}
123
126
  describedBy={`${id}-error`}
124
127
  disabled={disabled}
128
+ dataTestId={dataTestId ? `${dataTestId}-minutes` : undefined}
125
129
  />
126
130
 
127
131
  {seconds && (
@@ -146,6 +150,7 @@ const TimeField = ({
146
150
  register={register}
147
151
  describedBy={`${id}-error`}
148
152
  disabled={disabled}
153
+ dataTestId={dataTestId ? `${dataTestId}-seconds` : undefined}
149
154
  />
150
155
  )}
151
156
 
@@ -161,6 +166,7 @@ const TimeField = ({
161
166
  error={error}
162
167
  describedBy={`${id}-error`}
163
168
  disabled={disabled}
169
+ dataTestId={dataTestId ? `${dataTestId}-period` : undefined}
164
170
  />
165
171
  </div>
166
172
 
@@ -20,6 +20,13 @@
20
20
  width: 100%;
21
21
  }
22
22
 
23
+ .hero__buttons {
24
+ @apply grid;
25
+ @apply md:grid-cols-4;
26
+ @apply gap-5;
27
+ @apply max-w-screen-md;
28
+ @apply m-auto;
29
+ }
23
30
  .hero__title {
24
31
  @apply text-4xl;
25
32
  @apply mb-5;
@@ -46,9 +46,9 @@ const Hero = (props: HeroProps) => {
46
46
  {props.buttonTitle && props.buttonLink && (
47
47
  <>
48
48
  {props.secondaryButtonTitle && props.secondaryButtonLink ? (
49
- <div className="grid md:grid-cols-6 gap-5 max-w-screen-lg m-auto">
49
+ <div className="hero__buttons">
50
50
  <HeroButton
51
- className={"md:col-start-3 with_secondary"}
51
+ className={"md:col-start-2 with_secondary"}
52
52
  href={props.buttonLink}
53
53
  title={props.buttonTitle}
54
54
  />
@@ -322,7 +322,10 @@
322
322
  .navbar-notice {
323
323
  @apply w-full;
324
324
  @apply bg-primary;
325
- @apply text-right;
325
+ @screen md {
326
+ @apply text-right;
327
+ }
328
+ @apply text-left;
326
329
  @apply text-white;
327
330
  @apply block;
328
331
  }
@@ -338,11 +341,9 @@
338
341
  .navbar-notice__text {
339
342
  @apply max-w-5xl;
340
343
  @apply text-sm;
341
- @apply pt-2;
342
- @apply pb-2;
343
- @apply pr-3;
344
+ @apply py-2;
345
+ @apply px-3;
344
346
  margin: auto;
345
- height: 36px;
346
347
 
347
348
  a,
348
349
  a:hover {
@@ -1099,6 +1099,7 @@
1099
1099
  "percentAMIUnit": "%{percent}% AMI Unit",
1100
1100
  "pickupAddress": "Pickup Address",
1101
1101
  "postmarkByDate": "Postmark by Date",
1102
+ "postmarkByTime": "Postmark by Time",
1102
1103
  "postmarksConsideredQuestion": "Are postmarks considered?",
1103
1104
  "priorityUnits": "Priority Units",
1104
1105
  "priorityUnitsDescription": "This building has units set aside if any of the following apply to you or someone in your household:",
@@ -22,14 +22,18 @@ export interface ApplicationAddressesProps {
22
22
  const SubmitApplication = (props: ApplicationAddressesProps) => {
23
23
  return (
24
24
  <>
25
- {(props.applicationMailingAddress || props.applicationDropOffAddress) && (
25
+ {(props.applicationMailingAddress ||
26
+ props.applicationDropOffAddress ||
27
+ props.postmarkedApplicationData) && (
26
28
  <section className="aside-block is-tinted bg-gray-100">
27
29
  <NumberedHeader num={2} text={t("listings.apply.submitAPaperApplication")} />
28
- {props.applicationMailingAddress && (
30
+ {(props.applicationMailingAddress || props.postmarkedApplicationData) && (
29
31
  <>
30
32
  <h3 className="text-caps-tiny">{t("listings.apply.sendByUsMail")}</h3>
31
33
  <p className="text-gray-700">{props.applicationOrganization}</p>
32
- <SidebarAddress address={props.applicationMailingAddress} />
34
+ {props.applicationMailingAddress && (
35
+ <SidebarAddress address={props.applicationMailingAddress} />
36
+ )}
33
37
  <p className="mt-4 text-tiny text-gray-750">
34
38
  {props.postmarkedApplicationData?.postmarkedApplicationsReceivedByDate
35
39
  ? t("listings.apply.postmarkedApplicationsMustBeReceivedByDate", {