@bloom-housing/ui-components 4.2.2-alpha.2 → 4.2.2-alpha.3

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,17 @@
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
+ ## [4.2.2-alpha.3](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.2...@bloom-housing/ui-components@4.2.2-alpha.3) (2022-04-18)
7
+
8
+
9
+ ### Features
10
+
11
+ * refactor ada form fields ([#2612](https://github.com/bloom-housing/bloom/issues/2612)) ([f516f21](https://github.com/bloom-housing/bloom/commit/f516f2164249cea5b622b6bb5cd6efb5455003ca))
12
+
13
+
14
+
15
+
16
+
6
17
  ## [4.2.2-alpha.2](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.1...@bloom-housing/ui-components@4.2.2-alpha.2) (2022-04-14)
7
18
 
8
19
  **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": "4.2.2-alpha.2",
3
+ "version": "4.2.2-alpha.3",
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",
@@ -100,5 +100,5 @@
100
100
  "tailwindcss": "2.2.10",
101
101
  "typesafe-actions": "^5.1.0"
102
102
  },
103
- "gitHead": "6a1daa540cc0bd206fc89d9444b187502c80e712"
103
+ "gitHead": "b6c84fb42e0ac23c78b8886db058957a7feb03a1"
104
104
  }
@@ -5,37 +5,38 @@ import { UseFormMethods, RegisterOptions } from "react-hook-form"
5
5
  import { Field } from "./Field"
6
6
  import { t } from "../helpers/translator"
7
7
 
8
- interface FieldSingle {
9
- id: string
10
- label: string
11
- value?: string
8
+ export interface FieldSingle {
9
+ additionalText?: boolean
12
10
  dataTestId?: string
13
11
  defaultChecked?: boolean
14
- description?: React.ReactNode
15
12
  defaultText?: string
13
+ description?: React.ReactNode
16
14
  disabled?: boolean
17
- note?: string
15
+ id: string
18
16
  inputProps?: Record<string, unknown>
17
+ label: string
18
+ uniqueName?: boolean
19
+ note?: string
19
20
  subFields?: FieldSingle[]
20
21
  type?: string
21
- additionalText?: boolean
22
+ value?: string
22
23
  }
23
24
 
24
25
  interface FieldGroupProps {
26
+ dataTestId?: string
25
27
  error?: boolean
26
28
  errorMessage?: string
27
- name: string
28
- type?: string
29
- groupLabel?: string
29
+ fieldClassName?: string
30
+ fieldGroupClassName?: string
31
+ fieldLabelClassName?: string
30
32
  fields?: FieldSingle[]
33
+ groupLabel?: string
31
34
  groupNote?: string
32
35
  groupSubNote?: string
36
+ name: string
33
37
  register: UseFormMethods["register"]
38
+ type?: string
34
39
  validation?: RegisterOptions
35
- fieldGroupClassName?: string
36
- fieldClassName?: string
37
- fieldLabelClassName?: string
38
- dataTestId?: string
39
40
  }
40
41
 
41
42
  const FieldGroup = ({
@@ -75,7 +76,7 @@ const FieldGroup = ({
75
76
  type={type}
76
77
  id={item.id}
77
78
  defaultValue={item.value || item.id}
78
- name={subfieldsExist() ? `${name}-${item.value}` : name}
79
+ name={subfieldsExist() || item.uniqueName ? `${name}-${item.value}` : name}
79
80
  onClick={(e) => {
80
81
  // We cannot reliably target an individual checkbox in a field group since they have the same name, so we keep track on our own
81
82
  if (e.currentTarget.checked) {
@@ -152,7 +153,7 @@ const FieldGroup = ({
152
153
  )
153
154
  }
154
155
  return (
155
- <>
156
+ <div>
156
157
  {groupLabel && <label className="field-label--caps">{groupLabel}</label>}
157
158
  {groupNote && <p className="field-note mb-4">{groupNote}</p>}
158
159
 
@@ -176,7 +177,7 @@ const FieldGroup = ({
176
177
  {errorMessage}
177
178
  </ErrorMessage>
178
179
  )}
179
- </>
180
+ </div>
180
181
  )
181
182
  }
182
183
 
@@ -98,6 +98,7 @@
98
98
  "application.contact.yourPhoneNumber": "Your Phone Number",
99
99
  "application.contact.zip": "Zip",
100
100
  "application.contact.zipCode": "Zipcode",
101
+ "application.details.adaPriorities": "ADA Priorities Selected",
101
102
  "application.edited": "Edited",
102
103
  "application.financial.income.instruction1": "Add up your total gross (pre-tax) household income from wages, benefits and other sources from all household members.",
103
104
  "application.financial.income.instruction2": "You only need to provide an estimated total right now. The actual total will be calculated if you are selected.",