@bloom-housing/ui-components 6.0.0 → 6.0.1-alpha.1

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 (79) hide show
  1. package/CHANGELOG.md +236 -7
  2. package/index.ts +1 -0
  3. package/package.json +3 -5
  4. package/src/actions/Button.tsx +1 -0
  5. package/src/actions/LinkButton.tsx +1 -0
  6. package/src/blocks/FormCard.scss +1 -0
  7. package/src/blocks/HousingCounselor.tsx +8 -3
  8. package/src/blocks/ImageCard.tsx +24 -13
  9. package/src/blocks/MediaCard.docs.mdx +37 -0
  10. package/src/blocks/MediaCard.scss +10 -11
  11. package/src/blocks/MediaCard.tsx +4 -4
  12. package/src/blocks/StandardCard.tsx +1 -1
  13. package/src/blocks/StatusItem.tsx +17 -6
  14. package/src/forms/DOBField.tsx +20 -8
  15. package/src/forms/DateField.tsx +16 -7
  16. package/src/forms/Dropzone.scss +7 -0
  17. package/src/forms/Dropzone.tsx +18 -5
  18. package/src/forms/Field.tsx +5 -0
  19. package/src/forms/FieldGroup.tsx +14 -3
  20. package/src/forms/HouseholdMemberForm.tsx +4 -1
  21. package/src/forms/HouseholdSizeField.tsx +16 -6
  22. package/src/forms/TimeField.tsx +15 -6
  23. package/src/global/custom_counter.scss +1 -1
  24. package/src/global/forms.scss +38 -5
  25. package/src/global/headers.scss +1 -1
  26. package/src/global/markdown.scss +2 -2
  27. package/src/global/vendor/ag_grid.scss +43 -9
  28. package/src/headers/Hero.tsx +8 -1
  29. package/src/headers/PageHeader.scss +3 -2
  30. package/src/headers/PageHeader.tsx +5 -1
  31. package/src/headers/SiteHeader.tsx +11 -4
  32. package/src/helpers/formOptions.tsx +4 -1
  33. package/src/helpers/formatYesNoLabel.ts +8 -6
  34. package/src/locales/es.json +1 -1
  35. package/src/locales/general.json +9 -4
  36. package/src/locales/tl.json +1 -1
  37. package/src/locales/vi.json +1 -1
  38. package/src/locales/zh.json +1 -1
  39. package/src/navigation/Breadcrumbs.scss +1 -0
  40. package/src/navigation/Breadcrumbs.tsx +1 -1
  41. package/src/navigation/FooterNav.tsx +5 -1
  42. package/src/navigation/LanguageNav.tsx +1 -1
  43. package/src/navigation/ProgressNav.docs.mdx +47 -0
  44. package/src/navigation/ProgressNav.scss +101 -56
  45. package/src/navigation/ProgressNav.tsx +45 -15
  46. package/src/navigation/SideNav.scss +56 -0
  47. package/src/navigation/SideNav.tsx +2 -2
  48. package/src/navigation/TabNav.scss +1 -1
  49. package/src/navigation/TabNav.tsx +1 -1
  50. package/src/navigation/Tabs.scss +25 -6
  51. package/src/notifications/AlertBox.docs.mdx +41 -0
  52. package/src/notifications/AlertBox.scss +78 -41
  53. package/src/notifications/AlertBox.tsx +20 -14
  54. package/src/notifications/SiteAlert.tsx +3 -0
  55. package/src/notifications/StatusMessage.tsx +8 -2
  56. package/src/notifications/alertTypes.ts +1 -0
  57. package/src/overlays/Modal.scss +3 -1
  58. package/src/page_components/ApplicationTimeline.scss +6 -6
  59. package/src/page_components/ApplicationTimeline.tsx +17 -7
  60. package/src/page_components/NavigationHeader.tsx +10 -10
  61. package/src/page_components/forgot-password/FormForgotPassword.tsx +1 -1
  62. package/src/page_components/listing/AdditionalFees.tsx +1 -1
  63. package/src/page_components/listing/ListingCard.scss +4 -0
  64. package/src/page_components/listing/ListingCard.tsx +18 -3
  65. package/src/page_components/listing/listing_sidebar/Contact.tsx +2 -2
  66. package/src/page_components/listing/listing_sidebar/GetApplication.tsx +31 -16
  67. package/src/page_components/listing/listing_sidebar/ListingUpdated.tsx +5 -1
  68. package/src/page_components/listing/listing_sidebar/OrDivider.tsx +4 -2
  69. package/src/page_components/listing/listing_sidebar/ReferralApplication.tsx +7 -4
  70. package/src/page_components/listing/listing_sidebar/events/DownloadLotteryResults.tsx +6 -1
  71. package/src/page_components/sign-in/FormSignIn.tsx +1 -1
  72. package/src/page_components/sign-in/FormSignInErrorBox.tsx +1 -1
  73. package/src/sections/InfoCardGrid.scss +1 -1
  74. package/src/sections/InfoCardGrid.tsx +4 -1
  75. package/src/sections/ListSection.tsx +1 -1
  76. package/src/tables/AgTable.tsx +56 -26
  77. package/src/tables/StandardTable.tsx +19 -7
  78. package/src/text/Tag.scss +7 -0
  79. package/src/text/Tag.tsx +2 -0
package/CHANGELOG.md CHANGED
@@ -3,22 +3,251 @@
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.0.0](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.0...@bloom-housing/ui-components@6.0.0) (2022-08-25)
6
+ ## [6.0.1-alpha.1](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@6.0.1-alpha.0...@bloom-housing/ui-components@6.0.1-alpha.1) (2022-09-28)
7
7
 
8
8
 
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)
9
+ ### Features
10
+
11
+ * add duplicates v2 feature ([11cd2b3](https://github.com/bloom-housing/bloom/commit/11cd2b3b4d39c69e10ca1c9a8c2c7199b4a08b6b)), closes [#3006](https://github.com/bloom-housing/bloom/issues/3006) [#2961](https://github.com/bloom-housing/bloom/issues/2961) [#3020](https://github.com/bloom-housing/bloom/issues/3020) [#3093](https://github.com/bloom-housing/bloom/issues/3093) [#2974](https://github.com/bloom-housing/bloom/issues/2974) [#2909](https://github.com/bloom-housing/bloom/issues/2909) [#2958](https://github.com/bloom-housing/bloom/issues/2958) [#2904](https://github.com/bloom-housing/bloom/issues/2904) [#2987](https://github.com/bloom-housing/bloom/issues/2987) [#2990](https://github.com/bloom-housing/bloom/issues/2990) [#2989](https://github.com/bloom-housing/bloom/issues/2989) [#2991](https://github.com/bloom-housing/bloom/issues/2991) [#2985](https://github.com/bloom-housing/bloom/issues/2985) [#2994](https://github.com/bloom-housing/bloom/issues/2994) [#2995](https://github.com/bloom-housing/bloom/issues/2995) [#2999](https://github.com/bloom-housing/bloom/issues/2999) [#2950](https://github.com/bloom-housing/bloom/issues/2950) [#2968](https://github.com/bloom-housing/bloom/issues/2968) [#2784](https://github.com/bloom-housing/bloom/issues/2784) [#2988](https://github.com/bloom-housing/bloom/issues/2988) [#3016](https://github.com/bloom-housing/bloom/issues/3016) [#3018](https://github.com/bloom-housing/bloom/issues/3018) [#3017](https://github.com/bloom-housing/bloom/issues/3017) [#3005](https://github.com/bloom-housing/bloom/issues/3005) [#3012](https://github.com/bloom-housing/bloom/issues/3012) [#3014](https://github.com/bloom-housing/bloom/issues/3014) [#3000](https://github.com/bloom-housing/bloom/issues/3000) [#3021](https://github.com/bloom-housing/bloom/issues/3021) [#3027](https://github.com/bloom-housing/bloom/issues/3027) [#3036](https://github.com/bloom-housing/bloom/issues/3036) [#3023](https://github.com/bloom-housing/bloom/issues/3023) [#3040](https://github.com/bloom-housing/bloom/issues/3040) [#3054](https://github.com/bloom-housing/bloom/issues/3054) [#3050](https://github.com/bloom-housing/bloom/issues/3050) [#483](https://github.com/bloom-housing/bloom/issues/483) [#3073](https://github.com/bloom-housing/bloom/issues/3073) [#3070](https://github.com/bloom-housing/bloom/issues/3070) [#3041](https://github.com/bloom-housing/bloom/issues/3041) [#3061](https://github.com/bloom-housing/bloom/issues/3061) [#3077](https://github.com/bloom-housing/bloom/issues/3077) [#3063](https://github.com/bloom-housing/bloom/issues/3063) [#3084](https://github.com/bloom-housing/bloom/issues/3084) [#3088](https://github.com/bloom-housing/bloom/issues/3088) [#2892](https://github.com/bloom-housing/bloom/issues/2892) [#3006](https://github.com/bloom-housing/bloom/issues/3006) [#2961](https://github.com/bloom-housing/bloom/issues/2961) [#3020](https://github.com/bloom-housing/bloom/issues/3020) [#3086](https://github.com/bloom-housing/bloom/issues/3086) [#3102](https://github.com/bloom-housing/bloom/issues/3102) [#3101](https://github.com/bloom-housing/bloom/issues/3101) [#3104](https://github.com/bloom-housing/bloom/issues/3104) [#3105](https://github.com/bloom-housing/bloom/issues/3105)
10
12
 
11
13
 
12
14
  ### BREAKING CHANGES
13
15
 
14
- * prop name change for header from "text" to "content"
16
+ * The preference and program entities have been merged into a single entity called MultiselectQuestion
15
17
 
16
18
  * chore(release): version
17
19
 
18
- - @bloom-housing/shared-helpers@5.0.1-alpha.2
19
- - @bloom-housing/partners@5.0.1-alpha.2
20
- - @bloom-housing/public@5.0.1-alpha.2
21
- - @bloom-housing/ui-components@5.0.1-alpha.1
20
+ - @bloom-housing/backend-core@5.1.1-alpha.8
21
+ - @bloom-housing/shared-helpers@5.1.1-alpha.18
22
+ - @bloom-housing/partners@5.1.1-alpha.20
23
+ - @bloom-housing/public@5.1.1-alpha.18
24
+ - @bloom-housing/ui-components@5.1.1-alpha.11
25
+
26
+
27
+
28
+
29
+
30
+ ## [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)
31
+
32
+ **Note:** Version bump only for package @bloom-housing/ui-components
33
+
34
+
35
+
36
+
37
+
38
+ ## [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)
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * email tests ([#3095](https://github.com/bloom-housing/bloom/issues/3095)) ([a663dfd](https://github.com/bloom-housing/bloom/commit/a663dfd3df457f88130e59c37ea30d70ae2b6d0b))
44
+ * heading size issues on resources page ([#3090](https://github.com/bloom-housing/bloom/issues/3090)) ([d7492a2](https://github.com/bloom-housing/bloom/commit/d7492a2b0fc6ec877fa99d7234a373cca7fd86ac))
45
+
46
+
47
+
48
+
49
+
50
+ ## [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)
51
+
52
+
53
+ ### Features
54
+
55
+ * **preferences:** add delete preference button ([#3075](https://github.com/bloom-housing/bloom/issues/3075)) ([29a079e](https://github.com/bloom-housing/bloom/commit/29a079e23ecc5cd31589993fef0c9de661c6e8c8))
56
+
57
+
58
+
59
+
60
+
61
+ ## [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)
62
+
63
+ **Note:** Version bump only for package @bloom-housing/ui-components
64
+
65
+
66
+
67
+
68
+
69
+ ## [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)
70
+
71
+ **Note:** Version bump only for package @bloom-housing/ui-components
72
+
73
+
74
+
75
+
76
+
77
+ ## [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)
78
+
79
+
80
+ ### Bug Fixes
81
+
82
+ * 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))
83
+
84
+
85
+
86
+
87
+
88
+ ## [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)
89
+
90
+ **Note:** Version bump only for package @bloom-housing/ui-components
91
+
92
+
93
+
94
+
95
+
96
+ ## [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)
97
+
98
+ **Note:** Version bump only for package @bloom-housing/ui-components
99
+
100
+
101
+
102
+
103
+
104
+ ## [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)
105
+
106
+
107
+ ### Features
108
+
109
+ * 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))
110
+
111
+
112
+
113
+
114
+
115
+ ## [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)
116
+
117
+ **Note:** Version bump only for package @bloom-housing/ui-components
118
+
119
+
120
+
121
+
122
+
123
+ ## [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)
124
+
125
+
126
+ ### Bug Fixes
127
+
128
+ * 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))
129
+
130
+
131
+
132
+
133
+
134
+ ## [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)
135
+
136
+
137
+ ### Features
138
+
139
+ * 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))
140
+
141
+
142
+
143
+
144
+
145
+ ## [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)
146
+
147
+ **Note:** Version bump only for package @bloom-housing/ui-components
148
+
149
+
150
+
151
+
152
+
153
+ ## [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)
154
+
155
+
156
+ ### Bug Fixes
157
+
158
+ * add unit tests to partners ([#3023](https://github.com/bloom-housing/bloom/issues/3023)) ([92889f5](https://github.com/bloom-housing/bloom/commit/92889f56f1fc6dc54be207ca0cf3dd9ce58176d1))
159
+
160
+
161
+
162
+
163
+
164
+ ## [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)
165
+
166
+ **Note:** Version bump only for package @bloom-housing/ui-components
167
+
168
+
169
+
170
+
171
+
172
+ ## [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)
173
+
174
+ **Note:** Version bump only for package @bloom-housing/ui-components
175
+
176
+
177
+
178
+
179
+
180
+ ## [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)
181
+
182
+ **Note:** Version bump only for package @bloom-housing/ui-components
183
+
184
+
185
+
186
+
187
+
188
+ ## [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)
189
+
190
+
191
+ ### Bug Fixes
192
+
193
+ * 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))
194
+
195
+
196
+
197
+
198
+
199
+ ## [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)
200
+
201
+
202
+ ### Bug Fixes
203
+
204
+ * null app fee showing null string ([#3016](https://github.com/bloom-housing/bloom/issues/3016)) ([05e28ad](https://github.com/bloom-housing/bloom/commit/05e28ad9f887dcfff5567af96e97be50c86b2109))
205
+
206
+
207
+
208
+
209
+
210
+ ## [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)
211
+
212
+
213
+ ### Bug Fixes
214
+
215
+ * **login:** too many login attempts fix ([#2988](https://github.com/bloom-housing/bloom/issues/2988)) ([4323e1c](https://github.com/bloom-housing/bloom/commit/4323e1c4cee18d8ee805378b32ae35826013d5c4))
216
+
217
+
218
+
219
+
220
+
221
+ ## [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)
222
+
223
+ **Note:** Version bump only for package @bloom-housing/ui-components
224
+
225
+
226
+
227
+
228
+
229
+ ## [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)
230
+
231
+ **Note:** Version bump only for package @bloom-housing/ui-components
232
+
233
+
234
+
235
+
236
+
237
+ ## [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)
238
+
239
+ **Note:** Version bump only for package @bloom-housing/ui-components
240
+
241
+
242
+
243
+
244
+
245
+ ## [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)
246
+
247
+
248
+ ### Bug Fixes
249
+
250
+ * add margin in contact section ([#2999](https://github.com/bloom-housing/bloom/issues/2999)) ([4acb49a](https://github.com/bloom-housing/bloom/commit/4acb49acf17ebabb7a0a34160d992cb5f63eeb02))
22
251
 
23
252
 
24
253
 
package/index.ts CHANGED
@@ -89,6 +89,7 @@ export * from "./src/navigation/ProgressNav"
89
89
  export * from "./src/navigation/TabNav"
90
90
  export * from "./src/navigation/Tabs"
91
91
  export * from "./src/navigation/Breadcrumbs"
92
+ export * from "./src/navigation/SideNav"
92
93
 
93
94
  /* Notifications */
94
95
  export * from "./src/notifications/AlertBox"
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.1",
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": "^4.5.5",
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": "4144d01ef184f31f6fd2c943ee2487025170126c"
113
+ "gitHead": "413ca224f8c49c4ae69e431cfabe26545fe54159"
116
114
  }
@@ -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
  >
@@ -39,6 +39,7 @@ const LinkButton = (props: LinkButtonProps) => {
39
39
  <LinkComponent
40
40
  href={props.href}
41
41
  aria-hidden={props.ariaHidden}
42
+ tabIndex={props.ariaHidden ? -1 : 0}
42
43
  className={buttonClasses.join(" ")}
43
44
  data-test-id={props.dataTestId}
44
45
  >
@@ -32,6 +32,7 @@
32
32
  @apply border-t-4;
33
33
  @apply border-primary;
34
34
  @apply leading-tight;
35
+ @apply text-3xl;
35
36
 
36
37
  @screen md {
37
38
  @apply mx-auto;
@@ -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>
@@ -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
- return props.statuses?.map((status, index) => {
70
+ const statuses = props.statuses?.map((status, index) => {
68
71
  return (
69
- <aside className="image-card__status" aria-label={status.content} key={index}>
70
- <ApplicationStatus
71
- status={status.status}
72
- content={status.content}
73
- subContent={status.subContent}
74
- withIcon={!status.hideIcon}
75
- iconType={status.iconType}
76
- vivid
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={props.description || t("listings.buildingImageAltText")}
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
- padding-top: var(--card-padding);
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
 
@@ -22,13 +22,13 @@ const MediaCard = (props: MediaCardProps) => {
22
22
  aria-label={"Launch video"}
23
23
  >
24
24
  <div className="media-card__header">
25
- <div className="media-card__icon-container">
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
- <h3 className="media-card__title">{props.title}</h3>
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={3}>
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")}: {props.applicationDueDate}
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")}: {t("application.statuses.submitted")}
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>