@bloom-housing/ui-components 6.0.0 → 6.0.1-alpha.0
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 +214 -9
- package/package.json +3 -5
- package/src/actions/Button.tsx +1 -0
- package/src/actions/LinkButton.tsx +1 -0
- package/src/blocks/FormCard.scss +1 -0
- package/src/blocks/HousingCounselor.tsx +8 -3
- package/src/blocks/ImageCard.tsx +24 -13
- package/src/blocks/MediaCard.docs.mdx +37 -0
- package/src/blocks/MediaCard.scss +10 -11
- package/src/blocks/MediaCard.tsx +4 -4
- package/src/blocks/StandardCard.tsx +1 -1
- package/src/blocks/StatusItem.tsx +17 -6
- package/src/forms/DOBField.tsx +20 -8
- package/src/forms/DateField.tsx +16 -7
- package/src/forms/Dropzone.scss +7 -0
- package/src/forms/Dropzone.tsx +18 -5
- package/src/forms/Field.tsx +5 -0
- package/src/forms/FieldGroup.tsx +14 -3
- package/src/forms/HouseholdMemberForm.tsx +4 -1
- package/src/forms/HouseholdSizeField.tsx +16 -6
- package/src/forms/TimeField.tsx +15 -6
- package/src/global/custom_counter.scss +1 -1
- package/src/global/forms.scss +38 -5
- package/src/global/headers.scss +1 -1
- package/src/global/markdown.scss +2 -2
- package/src/headers/Hero.tsx +8 -1
- package/src/headers/PageHeader.scss +1 -1
- package/src/headers/PageHeader.tsx +5 -1
- package/src/headers/SiteHeader.tsx +11 -4
- package/src/helpers/formOptions.tsx +4 -1
- package/src/helpers/formatYesNoLabel.ts +8 -6
- package/src/locales/es.json +1 -1
- package/src/locales/general.json +9 -4
- package/src/locales/tl.json +1 -1
- package/src/locales/vi.json +1 -1
- package/src/locales/zh.json +1 -1
- package/src/navigation/Breadcrumbs.tsx +1 -1
- package/src/navigation/FooterNav.tsx +5 -1
- package/src/navigation/LanguageNav.tsx +1 -1
- package/src/navigation/ProgressNav.docs.mdx +47 -0
- package/src/navigation/ProgressNav.scss +101 -56
- package/src/navigation/ProgressNav.tsx +45 -15
- package/src/navigation/TabNav.scss +1 -1
- package/src/navigation/TabNav.tsx +1 -1
- package/src/notifications/AlertBox.docs.mdx +41 -0
- package/src/notifications/AlertBox.scss +78 -41
- package/src/notifications/AlertBox.tsx +20 -14
- package/src/notifications/SiteAlert.tsx +3 -0
- package/src/notifications/StatusMessage.tsx +8 -2
- package/src/notifications/alertTypes.ts +1 -0
- package/src/overlays/Modal.scss +3 -1
- package/src/page_components/ApplicationTimeline.scss +6 -6
- package/src/page_components/ApplicationTimeline.tsx +17 -7
- package/src/page_components/forgot-password/FormForgotPassword.tsx +1 -1
- package/src/page_components/listing/AdditionalFees.tsx +1 -1
- package/src/page_components/listing/ListingCard.scss +4 -0
- package/src/page_components/listing/ListingCard.tsx +18 -3
- package/src/page_components/listing/listing_sidebar/Contact.tsx +2 -2
- package/src/page_components/listing/listing_sidebar/GetApplication.tsx +31 -16
- package/src/page_components/listing/listing_sidebar/ListingUpdated.tsx +5 -1
- package/src/page_components/listing/listing_sidebar/OrDivider.tsx +4 -2
- package/src/page_components/listing/listing_sidebar/ReferralApplication.tsx +7 -4
- package/src/page_components/listing/listing_sidebar/events/DownloadLotteryResults.tsx +6 -1
- package/src/page_components/sign-in/FormSignIn.tsx +1 -1
- package/src/page_components/sign-in/FormSignInErrorBox.tsx +1 -1
- package/src/sections/InfoCardGrid.scss +1 -1
- package/src/sections/InfoCardGrid.tsx +4 -1
- package/src/sections/ListSection.tsx +1 -1
- package/src/tables/AgTable.tsx +10 -4
- package/src/tables/StandardTable.tsx +19 -7
- package/src/text/Tag.scss +7 -0
- package/src/text/Tag.tsx +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,22 +3,227 @@
|
|
|
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
|
-
|
|
6
|
+
## [6.0.1-alpha.0](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.35...@bloom-housing/ui-components@6.0.1-alpha.0) (2022-09-28)
|
|
7
7
|
|
|
8
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
8
9
|
|
|
9
|
-
* 2022-08-24 release (#2993) ([6f1deac](https://github.com/bloom-housing/bloom/commit/6f1deac5370fa8286b051b09431d153d22901b3a)), closes [#2993](https://github.com/bloom-housing/bloom/issues/2993) [#2821](https://github.com/bloom-housing/bloom/issues/2821) [#2764](https://github.com/bloom-housing/bloom/issues/2764) [#2767](https://github.com/bloom-housing/bloom/issues/2767) [#2787](https://github.com/bloom-housing/bloom/issues/2787) [#2769](https://github.com/bloom-housing/bloom/issues/2769) [#2781](https://github.com/bloom-housing/bloom/issues/2781) [#2827](https://github.com/bloom-housing/bloom/issues/2827) [Issue#2827](https://github.com/Issue/issues/2827) [#2788](https://github.com/bloom-housing/bloom/issues/2788) [#2842](https://github.com/bloom-housing/bloom/issues/2842) [#2822](https://github.com/bloom-housing/bloom/issues/2822) [#2847](https://github.com/bloom-housing/bloom/issues/2847) [#2830](https://github.com/bloom-housing/bloom/issues/2830) [#2788](https://github.com/bloom-housing/bloom/issues/2788) [#2842](https://github.com/bloom-housing/bloom/issues/2842) [#2827](https://github.com/bloom-housing/bloom/issues/2827) [Issue#2827](https://github.com/Issue/issues/2827) [#2822](https://github.com/bloom-housing/bloom/issues/2822) [#2846](https://github.com/bloom-housing/bloom/issues/2846) [#2851](https://github.com/bloom-housing/bloom/issues/2851) [#2594](https://github.com/bloom-housing/bloom/issues/2594) [#2812](https://github.com/bloom-housing/bloom/issues/2812) [#2799](https://github.com/bloom-housing/bloom/issues/2799) [#2828](https://github.com/bloom-housing/bloom/issues/2828) [#2843](https://github.com/bloom-housing/bloom/issues/2843) [#2827](https://github.com/bloom-housing/bloom/issues/2827) [#2875](https://github.com/bloom-housing/bloom/issues/2875) [#2859](https://github.com/bloom-housing/bloom/issues/2859) [#2848](https://github.com/bloom-housing/bloom/issues/2848) [#2785](https://github.com/bloom-housing/bloom/issues/2785)
|
|
10
10
|
|
|
11
11
|
|
|
12
|
-
### BREAKING CHANGES
|
|
13
12
|
|
|
14
|
-
* prop name change for header from "text" to "content"
|
|
15
13
|
|
|
16
|
-
|
|
14
|
+
## [5.1.1-alpha.35](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.34...@bloom-housing/ui-components@5.1.1-alpha.35) (2022-09-28)
|
|
17
15
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* email tests ([#3095](https://github.com/bloom-housing/bloom/issues/3095)) ([a663dfd](https://github.com/bloom-housing/bloom/commit/a663dfd3df457f88130e59c37ea30d70ae2b6d0b))
|
|
20
|
+
* heading size issues on resources page ([#3090](https://github.com/bloom-housing/bloom/issues/3090)) ([d7492a2](https://github.com/bloom-housing/bloom/commit/d7492a2b0fc6ec877fa99d7234a373cca7fd86ac))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
## [5.1.1-alpha.34](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.33...@bloom-housing/ui-components@5.1.1-alpha.34) (2022-09-28)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* **preferences:** add delete preference button ([#3075](https://github.com/bloom-housing/bloom/issues/3075)) ([29a079e](https://github.com/bloom-housing/bloom/commit/29a079e23ecc5cd31589993fef0c9de661c6e8c8))
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
## [5.1.1-alpha.33](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.32...@bloom-housing/ui-components@5.1.1-alpha.33) (2022-09-26)
|
|
38
|
+
|
|
39
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## [5.1.1-alpha.32](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.31...@bloom-housing/ui-components@5.1.1-alpha.32) (2022-09-26)
|
|
46
|
+
|
|
47
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
## [5.1.1-alpha.31](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.30...@bloom-housing/ui-components@5.1.1-alpha.31) (2022-09-26)
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
### Bug Fixes
|
|
57
|
+
|
|
58
|
+
* make pill style on listing card optional ([#3088](https://github.com/bloom-housing/bloom/issues/3088)) ([e574010](https://github.com/bloom-housing/bloom/commit/e57401067639e3e05a426f61dd0c3dc18dcda35d))
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
## [5.1.1-alpha.30](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.29...@bloom-housing/ui-components@5.1.1-alpha.30) (2022-09-26)
|
|
65
|
+
|
|
66
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## [5.1.1-alpha.29](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.28...@bloom-housing/ui-components@5.1.1-alpha.29) (2022-09-23)
|
|
73
|
+
|
|
74
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## [5.1.1-alpha.28](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.27...@bloom-housing/ui-components@5.1.1-alpha.28) (2022-09-19)
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Features
|
|
84
|
+
|
|
85
|
+
* add confirm modal when copying a preference ([#3041](https://github.com/bloom-housing/bloom/issues/3041)) ([b3d69e9](https://github.com/bloom-housing/bloom/commit/b3d69e9b557998489c828c86ff742c91feca799f))
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
## [5.1.1-alpha.27](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.26...@bloom-housing/ui-components@5.1.1-alpha.27) (2022-09-16)
|
|
92
|
+
|
|
93
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
## [5.1.1-alpha.26](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.25...@bloom-housing/ui-components@5.1.1-alpha.26) (2022-09-16)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
### Bug Fixes
|
|
103
|
+
|
|
104
|
+
* updated css class naming ([#483](https://github.com/bloom-housing/bloom/issues/483)) ([#3073](https://github.com/bloom-housing/bloom/issues/3073)) ([bfd68de](https://github.com/bloom-housing/bloom/commit/bfd68de406b1785676e6453afd1536159096d080))
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## [5.1.1-alpha.25](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.24...@bloom-housing/ui-components@5.1.1-alpha.25) (2022-09-14)
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
### Features
|
|
114
|
+
|
|
115
|
+
* allow alerts to be sticky under page header ([#3050](https://github.com/bloom-housing/bloom/issues/3050)) ([d776e84](https://github.com/bloom-housing/bloom/commit/d776e84f76a8bde3f24d1c6706ed35dd777dc66b))
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
## [5.1.1-alpha.24](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.23...@bloom-housing/ui-components@5.1.1-alpha.24) (2022-09-13)
|
|
122
|
+
|
|
123
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
## [5.1.1-alpha.23](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.22...@bloom-housing/ui-components@5.1.1-alpha.23) (2022-09-12)
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
### Bug Fixes
|
|
133
|
+
|
|
134
|
+
* add unit tests to partners ([#3023](https://github.com/bloom-housing/bloom/issues/3023)) ([92889f5](https://github.com/bloom-housing/bloom/commit/92889f56f1fc6dc54be207ca0cf3dd9ce58176d1))
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
## [5.1.1-alpha.22](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.21...@bloom-housing/ui-components@5.1.1-alpha.22) (2022-08-31)
|
|
141
|
+
|
|
142
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
## [5.1.1-alpha.21](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.20...@bloom-housing/ui-components@5.1.1-alpha.21) (2022-08-31)
|
|
149
|
+
|
|
150
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
## [5.1.1-alpha.20](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.19...@bloom-housing/ui-components@5.1.1-alpha.20) (2022-08-31)
|
|
157
|
+
|
|
158
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
## [5.1.1-alpha.19](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.18...@bloom-housing/ui-components@5.1.1-alpha.19) (2022-08-31)
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
### Bug Fixes
|
|
168
|
+
|
|
169
|
+
* table columns should take up full width ([#3005](https://github.com/bloom-housing/bloom/issues/3005)) ([5524049](https://github.com/bloom-housing/bloom/commit/5524049f248151b1d3510feb1ea73a7775f7f4d5))
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
## [5.1.1-alpha.18](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.17...@bloom-housing/ui-components@5.1.1-alpha.18) (2022-08-31)
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
### Bug Fixes
|
|
179
|
+
|
|
180
|
+
* null app fee showing null string ([#3016](https://github.com/bloom-housing/bloom/issues/3016)) ([05e28ad](https://github.com/bloom-housing/bloom/commit/05e28ad9f887dcfff5567af96e97be50c86b2109))
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
## [5.1.1-alpha.17](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.16...@bloom-housing/ui-components@5.1.1-alpha.17) (2022-08-30)
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
### Bug Fixes
|
|
190
|
+
|
|
191
|
+
* **login:** too many login attempts fix ([#2988](https://github.com/bloom-housing/bloom/issues/2988)) ([4323e1c](https://github.com/bloom-housing/bloom/commit/4323e1c4cee18d8ee805378b32ae35826013d5c4))
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
## [5.1.1-alpha.16](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.15...@bloom-housing/ui-components@5.1.1-alpha.16) (2022-08-30)
|
|
198
|
+
|
|
199
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
200
|
+
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
## [5.1.1-alpha.15](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.14...@bloom-housing/ui-components@5.1.1-alpha.15) (2022-08-29)
|
|
206
|
+
|
|
207
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
## [5.1.1-alpha.14](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.13...@bloom-housing/ui-components@5.1.1-alpha.14) (2022-08-29)
|
|
214
|
+
|
|
215
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
## [5.1.1-alpha.13](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.12...@bloom-housing/ui-components@5.1.1-alpha.13) (2022-08-26)
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
### Bug Fixes
|
|
225
|
+
|
|
226
|
+
* add margin in contact section ([#2999](https://github.com/bloom-housing/bloom/issues/2999)) ([4acb49a](https://github.com/bloom-housing/bloom/commit/4acb49acf17ebabb7a0a34160d992cb5f63eeb02))
|
|
22
227
|
|
|
23
228
|
|
|
24
229
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloom-housing/ui-components",
|
|
3
|
-
"version": "6.0.0",
|
|
3
|
+
"version": "6.0.1-alpha.0",
|
|
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",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"style-loader": "^1.1.3",
|
|
67
67
|
"ts-jest": "^26.4.1",
|
|
68
68
|
"ts-loader": "^8.0.4",
|
|
69
|
-
"typescript": "
|
|
69
|
+
"typescript": "4.6.4",
|
|
70
70
|
"webpack": "^4.44.2"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
@@ -85,7 +85,6 @@
|
|
|
85
85
|
"@types/react-dom": "^16.9.5",
|
|
86
86
|
"@types/react-text-mask": "^5.4.6",
|
|
87
87
|
"@types/react-transition-group": "^4.4.0",
|
|
88
|
-
"@types/sanitize-html": "^2.6.2",
|
|
89
88
|
"ag-grid-community": "^26.0.0",
|
|
90
89
|
"ag-grid-react": "^26.0.0",
|
|
91
90
|
"aria-autocomplete": "^1.4.0",
|
|
@@ -107,10 +106,9 @@
|
|
|
107
106
|
"react-tabs": "^3.2.2",
|
|
108
107
|
"react-text-mask": "^5.4.3",
|
|
109
108
|
"react-transition-group": "^4.4.1",
|
|
110
|
-
"sanitize-html": "^2.7.1",
|
|
111
109
|
"tailwindcss": "2.2.10",
|
|
112
110
|
"ts-jest": "^26.4.1",
|
|
113
111
|
"typesafe-actions": "^5.1.0"
|
|
114
112
|
},
|
|
115
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "2cfc84763d17fad62ed2675f85a046e05bdf91e2"
|
|
116
114
|
}
|
package/src/actions/Button.tsx
CHANGED
|
@@ -79,6 +79,7 @@ const Button = (props: ButtonProps) => {
|
|
|
79
79
|
onClick={props.onClick}
|
|
80
80
|
disabled={props.disabled || props.loading}
|
|
81
81
|
aria-hidden={props.ariaHidden}
|
|
82
|
+
tabIndex={props.ariaHidden ? -1 : 0}
|
|
82
83
|
aria-label={props.ariaLabel}
|
|
83
84
|
data-test-id={props.dataTestId || props["data-test-id"]}
|
|
84
85
|
>
|
package/src/blocks/FormCard.scss
CHANGED
|
@@ -9,6 +9,11 @@ export interface HousingCounselorProps {
|
|
|
9
9
|
name: string
|
|
10
10
|
phone?: string
|
|
11
11
|
website?: string
|
|
12
|
+
strings?: {
|
|
13
|
+
callNumber?: string
|
|
14
|
+
languageServices?: string
|
|
15
|
+
website?: string
|
|
16
|
+
}
|
|
12
17
|
}
|
|
13
18
|
|
|
14
19
|
const LanguageLabel = (language: string) => {
|
|
@@ -24,7 +29,7 @@ const HousingCounselor = (props: HousingCounselorProps) => {
|
|
|
24
29
|
<div className="resource-item text-base">
|
|
25
30
|
<h3 className="font-sans text-lg">{props.name}</h3>
|
|
26
31
|
<p className="text-sm text-gray-800 pb-2">
|
|
27
|
-
{t("housingCounselors.languageServices")}
|
|
32
|
+
{props.strings?.languageServices ?? t("housingCounselors.languageServices")}
|
|
28
33
|
{props.languages.map((language) => LanguageLabel(language))}
|
|
29
34
|
</p>
|
|
30
35
|
{props.addressStreet && (
|
|
@@ -35,13 +40,13 @@ const HousingCounselor = (props: HousingCounselorProps) => {
|
|
|
35
40
|
{props.phone && (
|
|
36
41
|
<a className="icon-item pb-1" href={`tel:+1${props.phone}`}>
|
|
37
42
|
<Icon symbol="phone" size="medium" fill={IconFillColors.primary} />
|
|
38
|
-
{` ${t("housingCounselors.call", { number: props.phone })}`}
|
|
43
|
+
{` ${props.strings?.callNumber ?? t("housingCounselors.call", { number: props.phone })}`}
|
|
39
44
|
</a>
|
|
40
45
|
)}
|
|
41
46
|
{props.website && (
|
|
42
47
|
<a className="icon-item" href={props.website}>
|
|
43
48
|
<Icon symbol="globe" size="medium" fill={IconFillColors.primary} />
|
|
44
|
-
{` ${t("t.website")}`}
|
|
49
|
+
{` ${props.strings?.website ?? t("t.website")}`}
|
|
45
50
|
</a>
|
|
46
51
|
)}
|
|
47
52
|
</div>
|
package/src/blocks/ImageCard.tsx
CHANGED
|
@@ -5,10 +5,10 @@ import "./ImageCard.scss"
|
|
|
5
5
|
import { Tag } from "../text/Tag"
|
|
6
6
|
import { ApplicationStatusType } from "../global/ApplicationStatusType"
|
|
7
7
|
import { AppearanceStyleType } from "../global/AppearanceTypes"
|
|
8
|
-
import { t } from "../helpers/translator"
|
|
9
8
|
import { Icon, IconFillColors, UniversalIconType } from "../icons/Icon"
|
|
10
9
|
import { Modal } from "../overlays/Modal"
|
|
11
10
|
import { Button } from "../actions/Button"
|
|
11
|
+
import { t } from "../helpers/translator"
|
|
12
12
|
|
|
13
13
|
export interface StatusBarType {
|
|
14
14
|
status?: ApplicationStatusType
|
|
@@ -53,6 +53,9 @@ export interface ImageCardProps {
|
|
|
53
53
|
moreImagesLabel?: string
|
|
54
54
|
/** The aria label of the clickable region of the images grid */
|
|
55
55
|
moreImagesDescription?: string
|
|
56
|
+
strings?: {
|
|
57
|
+
defaultImageAltText?: string
|
|
58
|
+
}
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
/**
|
|
@@ -64,20 +67,24 @@ const ImageCard = (props: ImageCardProps) => {
|
|
|
64
67
|
const [showModal, setShowModal] = useState(false)
|
|
65
68
|
|
|
66
69
|
const getStatuses = () => {
|
|
67
|
-
|
|
70
|
+
const statuses = props.statuses?.map((status, index) => {
|
|
68
71
|
return (
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
</aside>
|
|
72
|
+
<ApplicationStatus
|
|
73
|
+
status={status.status}
|
|
74
|
+
content={status.content}
|
|
75
|
+
subContent={status.subContent}
|
|
76
|
+
withIcon={!status.hideIcon}
|
|
77
|
+
iconType={status.iconType}
|
|
78
|
+
vivid
|
|
79
|
+
key={index}
|
|
80
|
+
/>
|
|
79
81
|
)
|
|
80
82
|
})
|
|
83
|
+
return (
|
|
84
|
+
<aside className="image-card__status" aria-label={`${props.description} Statuses`}>
|
|
85
|
+
{statuses}
|
|
86
|
+
</aside>
|
|
87
|
+
)
|
|
81
88
|
}
|
|
82
89
|
|
|
83
90
|
const innerClasses = ["image-card__inner"]
|
|
@@ -119,7 +126,11 @@ const ImageCard = (props: ImageCardProps) => {
|
|
|
119
126
|
{props.imageUrl ? (
|
|
120
127
|
<img
|
|
121
128
|
src={props.imageUrl}
|
|
122
|
-
alt={
|
|
129
|
+
alt={
|
|
130
|
+
props.description ??
|
|
131
|
+
props.strings?.defaultImageAltText ??
|
|
132
|
+
t("listings.buildingImageAltText")
|
|
133
|
+
}
|
|
123
134
|
/>
|
|
124
135
|
) : props.images && displayedImages ? (
|
|
125
136
|
displayedImages.map((image, index) => (
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
|
|
2
|
+
import { MediaCard } from "./MediaCard"
|
|
3
|
+
|
|
4
|
+
# Media Card
|
|
5
|
+
|
|
6
|
+
The media card component is used to describe the title and, optionally, subtitle of a corresponding piece of media. The header section and title of the media card is clickable and displays the media via the required handleClick prop.
|
|
7
|
+
|
|
8
|
+
<Canvas>
|
|
9
|
+
<Story id="blocks-media-card--with-title-and-subtitle" />
|
|
10
|
+
</Canvas>
|
|
11
|
+
<Canvas>
|
|
12
|
+
<Story id="blocks-media-card--with-just-title" />
|
|
13
|
+
</Canvas>
|
|
14
|
+
<Canvas>
|
|
15
|
+
<Story id="blocks-media-card--with-custom-icon" />
|
|
16
|
+
</Canvas>
|
|
17
|
+
|
|
18
|
+
## Component Properties
|
|
19
|
+
|
|
20
|
+
<ArgsTable of={MediaCard} />
|
|
21
|
+
|
|
22
|
+
## Theming Variables
|
|
23
|
+
|
|
24
|
+
You can apply CSS variables to the `.media-card` selector to customize the appearance of the component.
|
|
25
|
+
|
|
26
|
+
| Name | Type | Description | Default |
|
|
27
|
+
| ----------------------- | ----- | -------------------------------------------------------- | ----------------------------------------------- |
|
|
28
|
+
| `--header-height` | Size | The height of the header section | `--bloom-s24` |
|
|
29
|
+
| `--title-color` | Color | The color of media title and header section | `--bloom-color-primary-dark` |
|
|
30
|
+
| `--title-font-size` | Size | The font size of media title | `--bloom-font-size-base` |
|
|
31
|
+
| `--title-font-family` | Size | The font family of the media title | `--bloom-font-sans` |
|
|
32
|
+
| `--title-font-spacing` | Size | The letter spacing of media title | `--bloom-letter-spacing-wide` |
|
|
33
|
+
| `--subtitle-font-size` | Size | The font size of the media subtitle | `--bloom-font-size-tiny` |
|
|
34
|
+
| `--content-bg-color` | Color | The background color of card body | `--bloom-color-gray-200` |
|
|
35
|
+
| `--card-border` | Size | The card border settings (thickness, border type, color) | `--bloom-border-1 solid --bloom-color-gray-450` |
|
|
36
|
+
| `--card-border-rounded` | Size | The card corner radius | `--bloom-rounded` |
|
|
37
|
+
| `--card-padding` | Size | The padding of the card body | `--bloom-s6` |
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.media-card {
|
|
2
|
+
--header-height: var(--bloom-s24);
|
|
2
3
|
--title-color: var(--bloom-color-primary-dark);
|
|
3
4
|
--title-font-size: var(--bloom-font-size-base);
|
|
4
5
|
--title-font-family: var(--bloom-font-sans);
|
|
@@ -8,33 +9,30 @@
|
|
|
8
9
|
--card-border: var(--bloom-border-1) solid var(--bloom-color-gray-450);
|
|
9
10
|
--card-border-rounded: var(--bloom-rounded);
|
|
10
11
|
--card-padding: var(--bloom-s6);
|
|
11
|
-
--max-width: var(--bloom-width-lg);
|
|
12
|
-
--background-color: var(--bloom-color-white);
|
|
13
|
-
max-width: var(--max-width);
|
|
14
12
|
border: var(--card-border);
|
|
15
13
|
border-radius: var(--card-border-rounded);
|
|
16
14
|
background-color: var(--content-bg-color);
|
|
17
|
-
max-width: var(--max-width);
|
|
18
15
|
}
|
|
19
16
|
|
|
20
17
|
.media-card__header {
|
|
21
|
-
|
|
22
|
-
padding-bottom: var(--card-padding);
|
|
18
|
+
height: var(--header-height);
|
|
23
19
|
border-top-right-radius: calc(var(--card-border-rounded) - var(--bloom-border-1));
|
|
24
20
|
border-top-left-radius: calc(var(--card-border-rounded) - var(--bloom-border-1));
|
|
25
21
|
background-color: var(--title-color);
|
|
26
22
|
cursor: pointer;
|
|
23
|
+
position: relative;
|
|
24
|
+
svg {
|
|
25
|
+
position: absolute;
|
|
26
|
+
// Explicit values since reflective of icon size
|
|
27
|
+
top: calc(50% - 1.5rem);
|
|
28
|
+
left: calc(50% - 1.5rem);
|
|
29
|
+
}
|
|
27
30
|
}
|
|
28
31
|
|
|
29
32
|
.media-card__header-container {
|
|
30
33
|
width: 100%;
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
.media-card__icon-container {
|
|
34
|
-
display: flex;
|
|
35
|
-
justify-content: center;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
36
|
.media-card__body {
|
|
39
37
|
padding: var(--card-padding);
|
|
40
38
|
}
|
|
@@ -44,6 +42,7 @@
|
|
|
44
42
|
font-size: var(--title-font-size);
|
|
45
43
|
font-family: var(--title-font-family);
|
|
46
44
|
letter-spacing: var(--title-font-spacing);
|
|
45
|
+
text-align: left;
|
|
47
46
|
font-weight: 700;
|
|
48
47
|
}
|
|
49
48
|
|
package/src/blocks/MediaCard.tsx
CHANGED
|
@@ -22,13 +22,13 @@ const MediaCard = (props: MediaCardProps) => {
|
|
|
22
22
|
aria-label={"Launch video"}
|
|
23
23
|
>
|
|
24
24
|
<div className="media-card__header">
|
|
25
|
-
<
|
|
26
|
-
<Icon symbol={props.icon ?? faCirclePlay} size="2xl" fill="white" />
|
|
27
|
-
</div>
|
|
25
|
+
<Icon symbol={props.icon ?? faCirclePlay} size="2xl" fill="white" />
|
|
28
26
|
</div>
|
|
29
27
|
</button>
|
|
30
28
|
<div className="media-card__body">
|
|
31
|
-
<
|
|
29
|
+
<button onClick={props.handleClick}>
|
|
30
|
+
<h3 className="media-card__title">{props.title}</h3>
|
|
31
|
+
</button>
|
|
32
32
|
<div className={"media-card__subtitle"}>{props.subtitle}</div>
|
|
33
33
|
</div>
|
|
34
34
|
</div>
|
|
@@ -21,7 +21,7 @@ const StandardCard = ({
|
|
|
21
21
|
<div className={`standard-card ${className}`}>
|
|
22
22
|
<div className="standard-card__inner">
|
|
23
23
|
{title && (
|
|
24
|
-
<Heading className="standard-card__title" priority={
|
|
24
|
+
<Heading className="standard-card__title" priority={2}>
|
|
25
25
|
{title}
|
|
26
26
|
</Heading>
|
|
27
27
|
)}
|
|
@@ -10,6 +10,15 @@ interface StatusItemProps {
|
|
|
10
10
|
confirmationNumber?: string
|
|
11
11
|
listingName: string
|
|
12
12
|
listingURL: string
|
|
13
|
+
strings?: {
|
|
14
|
+
applicationDeadline?: string
|
|
15
|
+
edited?: string
|
|
16
|
+
seeListing?: string
|
|
17
|
+
status?: string
|
|
18
|
+
submittedStatus?: string
|
|
19
|
+
viewApplication?: string
|
|
20
|
+
yourNumber?: string
|
|
21
|
+
}
|
|
13
22
|
}
|
|
14
23
|
|
|
15
24
|
const StatusItem = (props: StatusItemProps) => {
|
|
@@ -22,7 +31,8 @@ const StatusItem = (props: StatusItemProps) => {
|
|
|
22
31
|
<h3 className="status-item__title">{props.listingName}</h3>
|
|
23
32
|
{props.applicationDueDate && (
|
|
24
33
|
<p className="status-item__due">
|
|
25
|
-
{t("listings.applicationDeadline")}:
|
|
34
|
+
{props.strings?.applicationDeadline ?? t("listings.applicationDeadline")}:{" "}
|
|
35
|
+
{props.applicationDueDate}
|
|
26
36
|
</p>
|
|
27
37
|
)}
|
|
28
38
|
</header>
|
|
@@ -32,7 +42,7 @@ const StatusItem = (props: StatusItemProps) => {
|
|
|
32
42
|
{props.confirmationNumber && (
|
|
33
43
|
<>
|
|
34
44
|
<span className="status-item__confirm-text">
|
|
35
|
-
{t("application.yourLotteryNumber")}:
|
|
45
|
+
{props.strings?.yourNumber ?? t("application.yourLotteryNumber")}:
|
|
36
46
|
</span>
|
|
37
47
|
<br />
|
|
38
48
|
<span className="status-item__confirm-number">{props.confirmationNumber}</span>
|
|
@@ -43,11 +53,12 @@ const StatusItem = (props: StatusItemProps) => {
|
|
|
43
53
|
<div className="status-item__action">
|
|
44
54
|
<p className="status-item__status">
|
|
45
55
|
<span className={"status-item__label"}>
|
|
46
|
-
{t("application.status")}:
|
|
56
|
+
{props.strings?.status ?? t("application.status")}:{" "}
|
|
57
|
+
{props.strings?.submittedStatus ?? t("application.statuses.submitted")}
|
|
47
58
|
</span>
|
|
48
59
|
</p>
|
|
49
60
|
<a href={props.applicationURL} className="button is-small">
|
|
50
|
-
{t("application.viewApplication")}
|
|
61
|
+
{props.strings?.viewApplication ?? t("application.viewApplication")}
|
|
51
62
|
</a>
|
|
52
63
|
</div>
|
|
53
64
|
</section>
|
|
@@ -55,13 +66,13 @@ const StatusItem = (props: StatusItemProps) => {
|
|
|
55
66
|
<footer className="status-item__footer">
|
|
56
67
|
<div className="status-item_links">
|
|
57
68
|
<LinkComponent className="status-item__link lined" href={props.listingURL}>
|
|
58
|
-
{t("t.seeListing")}
|
|
69
|
+
{props.strings?.seeListing ?? t("t.seeListing")}
|
|
59
70
|
</LinkComponent>
|
|
60
71
|
</div>
|
|
61
72
|
|
|
62
73
|
<div className="status-item__meta">
|
|
63
74
|
<p className="status-item__date">
|
|
64
|
-
{t("application.edited")}: {props.applicationUpdatedAt}
|
|
75
|
+
{props.strings?.edited ?? t("application.edited")}: {props.applicationUpdatedAt}
|
|
65
76
|
</p>
|
|
66
77
|
</div>
|
|
67
78
|
</footer>
|