@bloom-housing/ui-components 4.2.2-alpha.2 → 4.2.2-alpha.5
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 +33 -0
- package/package.json +2 -2
- package/src/forms/FieldGroup.tsx +18 -17
- package/src/headers/SiteHeader.tsx +4 -1
- package/src/locales/general.json +1 -0
- package/src/navigation/FooterNav.scss +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,39 @@
|
|
|
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.5](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.4...@bloom-housing/ui-components@4.2.2-alpha.5) (2022-04-19)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* footer nav widths ([42aef6f](https://github.com/bloom-housing/bloom/commit/42aef6f74a8a7e27c6bdb870cb6c69c7569f41c0))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [4.2.2-alpha.4](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.3...@bloom-housing/ui-components@4.2.2-alpha.4) (2022-04-18)
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* add optional prop for Language Nav aria label ([#2672](https://github.com/bloom-housing/bloom/issues/2672)) ([5f1b3f6](https://github.com/bloom-housing/bloom/commit/5f1b3f66f5269cfd9285b958f608cdb41e779c70))
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## [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)
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
* refactor ada form fields ([#2612](https://github.com/bloom-housing/bloom/issues/2612)) ([f516f21](https://github.com/bloom-housing/bloom/commit/f516f2164249cea5b622b6bb5cd6efb5455003ca))
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
6
39
|
## [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
40
|
|
|
8
41
|
**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.
|
|
3
|
+
"version": "4.2.2-alpha.5",
|
|
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": "
|
|
103
|
+
"gitHead": "3b4a99c8297c98da2db92e77af5ef3a00604a589"
|
|
104
104
|
}
|
package/src/forms/FieldGroup.tsx
CHANGED
|
@@ -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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
22
|
+
value?: string
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
interface FieldGroupProps {
|
|
26
|
+
dataTestId?: string
|
|
25
27
|
error?: boolean
|
|
26
28
|
errorMessage?: string
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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
|
|
|
@@ -24,6 +24,7 @@ export interface SiteHeaderProps {
|
|
|
24
24
|
dropdownItemClassName?: string
|
|
25
25
|
homeURL: string
|
|
26
26
|
imageOnly?: boolean
|
|
27
|
+
languageNavLabel?: string
|
|
27
28
|
languages?: LangItem[]
|
|
28
29
|
logoClass?: string
|
|
29
30
|
logoSrc: string
|
|
@@ -423,7 +424,9 @@ const SiteHeader = (props: SiteHeaderProps) => {
|
|
|
423
424
|
|
|
424
425
|
return (
|
|
425
426
|
<header className={"site-header"}>
|
|
426
|
-
{props.languages &&
|
|
427
|
+
{props.languages && (
|
|
428
|
+
<LanguageNav ariaLabel={props.languageNavLabel} languages={props.languages} />
|
|
429
|
+
)}
|
|
427
430
|
|
|
428
431
|
<div className={`navbar-notice ${!props.noticeMobile && `navbar-notice-hide`}`}>
|
|
429
432
|
<div className="navbar-notice__text">{props.notice ?? ""}</div>
|
package/src/locales/general.json
CHANGED
|
@@ -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.",
|