@bloom-housing/ui-components 5.1.1-alpha.9 → 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 +259 -0
- package/index.ts +1 -0
- package/package.json +3 -3
- package/src/actions/Button.tsx +1 -0
- package/src/actions/ButtonGroup.docs.mdx +30 -0
- package/src/actions/ButtonGroup.scss +61 -0
- package/src/actions/ButtonGroup.tsx +42 -0
- package/src/actions/LinkButton.tsx +1 -0
- package/src/blocks/FormCard.scss +2 -8
- 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 +14 -7
- 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 +11 -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 -55
- 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/Drawer.scss +7 -0
- package/src/overlays/Modal.scss +2 -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/listing/listing_sidebar/events/EventSection.tsx +1 -1
- package/src/page_components/sign-in/FormSignIn.tsx +1 -1
- package/src/page_components/sign-in/FormSignInErrorBox.tsx +1 -1
- package/src/prototypes/Swatch.tsx +1 -0
- 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,6 +3,265 @@
|
|
|
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.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
|
+
|
|
8
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
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)
|
|
15
|
+
|
|
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))
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
## [5.1.1-alpha.12](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.11...@bloom-housing/ui-components@5.1.1-alpha.12) (2022-08-24)
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
### Features
|
|
236
|
+
|
|
237
|
+
* show preference details on listing form ([#2989](https://github.com/bloom-housing/bloom/issues/2989)) ([b4b2b9e](https://github.com/bloom-housing/bloom/commit/b4b2b9ee75c4895ea5b0694dddbf0c8979c0e251))
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
## [5.1.1-alpha.11](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.10...@bloom-housing/ui-components@5.1.1-alpha.11) (2022-08-23)
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
* refactor!: preferences & programs data model merged (#2904) ([8e027ff](https://github.com/bloom-housing/bloom/commit/8e027ff905118f36c61bc0f974231d9bb8911131)), closes [#2904](https://github.com/bloom-housing/bloom/issues/2904)
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
### BREAKING CHANGES
|
|
250
|
+
|
|
251
|
+
* The preference and program entities have been merged into a single entity called MultiselectQuestion
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
## [5.1.1-alpha.10](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.9...@bloom-housing/ui-components@5.1.1-alpha.10) (2022-08-23)
|
|
258
|
+
|
|
259
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
6
265
|
## [5.1.1-alpha.9](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.8...@bloom-housing/ui-components@5.1.1-alpha.9) (2022-08-22)
|
|
7
266
|
|
|
8
267
|
|
package/index.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloom-housing/ui-components",
|
|
3
|
-
"version": "
|
|
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": {
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"ts-jest": "^26.4.1",
|
|
111
111
|
"typesafe-actions": "^5.1.0"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "2cfc84763d17fad62ed2675f85a046e05bdf91e2"
|
|
114
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
|
>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
|
|
2
|
+
import { Swatch } from "../prototypes/Swatch"
|
|
3
|
+
import { ButtonGroup } from "./ButtonGroup"
|
|
4
|
+
|
|
5
|
+
# ButtonGroup
|
|
6
|
+
|
|
7
|
+
The button group component lets you place multiple buttons along a horizontal or vertical (mobile primarily) axis and group/space buttons according to some simple flex rules.
|
|
8
|
+
|
|
9
|
+
<Canvas>
|
|
10
|
+
<Story id="actions-button-group--two-columns" />
|
|
11
|
+
</Canvas>
|
|
12
|
+
|
|
13
|
+
<br />
|
|
14
|
+
<br />
|
|
15
|
+
|
|
16
|
+
## Component Properties
|
|
17
|
+
|
|
18
|
+
<ArgsTable of={ButtonGroup} />
|
|
19
|
+
|
|
20
|
+
## Theming Variables
|
|
21
|
+
|
|
22
|
+
You can apply CSS variables to the `.button-group` selector to customize the appearance of the component.
|
|
23
|
+
|
|
24
|
+
| Name | Type | Description | Default |
|
|
25
|
+
| -------------------------- | ----- | ----------------------------------------------------------------------------------- | --------------------------------------------------- |
|
|
26
|
+
| `--background-color` | Color | Background behind the buttons | <Swatch colorVar="--bloom-color-primary-lighter" /> |
|
|
27
|
+
| `--padding-block` | Size | The space around the buttons in the block (vertical) direction | `--bloom-s8` |
|
|
28
|
+
| `--padding-inline-desktop` | Size | The space around the buttons in the inline (horizontal) direction on larger screens | `--bloom-s16` |
|
|
29
|
+
| `--padding-inline-mobile` | Size | The space around the buttons in the inline (horizontal) direction on small screens | `--bloom-s4` |
|
|
30
|
+
| `--inner-button-gap` | Size | The gap between buttons whether in separate columns or within the same column | `--bloom-s3` |
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
.button-group {
|
|
2
|
+
--background-color: var(--bloom-color-primary-lighter);
|
|
3
|
+
--padding-block: var(--bloom-s8);
|
|
4
|
+
--padding-inline-desktop: var(--bloom-s16);
|
|
5
|
+
--padding-inline-mobile: var(--bloom-s4);
|
|
6
|
+
--inner-button-gap: var(--bloom-s3);
|
|
7
|
+
|
|
8
|
+
--padding-inline: var(--padding-inline-desktop);
|
|
9
|
+
|
|
10
|
+
@media (max-width: $screen-sm) {
|
|
11
|
+
--padding-inline: var(--padding-inline-mobile);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
background-color: var(--background-color);
|
|
15
|
+
padding-block: var(--padding-block);
|
|
16
|
+
padding-inline: var(--padding-inline);
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-wrap: wrap;
|
|
19
|
+
gap: var(--inner-button-gap);
|
|
20
|
+
|
|
21
|
+
& > .button-group__column {
|
|
22
|
+
display: flex;
|
|
23
|
+
gap: var(--inner-button-gap);
|
|
24
|
+
|
|
25
|
+
.button {
|
|
26
|
+
@media (max-width: $screen-sm) {
|
|
27
|
+
--normal-rounded: var(--small-rounded);
|
|
28
|
+
--normal-padding: var(--small-padding);
|
|
29
|
+
--normal-font-size: var(--small-font-size);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&.has-between-spacing {
|
|
35
|
+
justify-content: space-between;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.has-even-spacing {
|
|
39
|
+
justify-content: space-evenly;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&.has-fullwidth-mobile-buttons {
|
|
43
|
+
&,
|
|
44
|
+
& > .button-group__column {
|
|
45
|
+
@media (max-width: $screen-sm) {
|
|
46
|
+
flex-direction: column;
|
|
47
|
+
|
|
48
|
+
.button {
|
|
49
|
+
width: 100%;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&.is-reversed {
|
|
56
|
+
&,
|
|
57
|
+
& > .button-group__column {
|
|
58
|
+
flex-direction: row-reverse;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import "./ButtonGroup.scss"
|
|
3
|
+
|
|
4
|
+
export enum ButtonGroupSpacing {
|
|
5
|
+
between = "between",
|
|
6
|
+
even = "even",
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ButtonGroupProps {
|
|
10
|
+
/** Pass either Button components in, or fragments which can contain one or more buttons */
|
|
11
|
+
columns: React.ReactNodeArray
|
|
12
|
+
/** Between spacing pushes the columns far apart, even spacing keeps them closer together */
|
|
13
|
+
spacing?: ButtonGroupSpacing
|
|
14
|
+
/** When true, buttons will collapse to a single column on small screens and go full-width */
|
|
15
|
+
fullwidthMobile?: boolean
|
|
16
|
+
/** When true, the flex ordering of columns will reverse (aka RTL) */
|
|
17
|
+
reversed?: boolean
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const ButtonGroup = ({
|
|
21
|
+
spacing = ButtonGroupSpacing.between,
|
|
22
|
+
columns,
|
|
23
|
+
fullwidthMobile,
|
|
24
|
+
reversed,
|
|
25
|
+
}: ButtonGroupProps) => {
|
|
26
|
+
const spacingClassName = `has-${spacing}-spacing`
|
|
27
|
+
const classNames = ["button-group", spacingClassName]
|
|
28
|
+
if (fullwidthMobile) classNames.push("has-fullwidth-mobile-buttons")
|
|
29
|
+
if (reversed) classNames.push("is-reversed")
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<div className={classNames.join(" ")}>
|
|
33
|
+
{columns.map((column, index) => (
|
|
34
|
+
<div key={index} className="button-group__column">
|
|
35
|
+
{column}
|
|
36
|
+
</div>
|
|
37
|
+
))}
|
|
38
|
+
</div>
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export { ButtonGroup as default, ButtonGroup }
|
package/src/blocks/FormCard.scss
CHANGED
|
@@ -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;
|
|
@@ -69,7 +70,6 @@
|
|
|
69
70
|
|
|
70
71
|
@screen print {
|
|
71
72
|
@apply py-2;
|
|
72
|
-
@apply px-0;
|
|
73
73
|
}
|
|
74
74
|
}
|
|
75
75
|
|
|
@@ -87,13 +87,7 @@
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
.form-card__group {
|
|
90
|
-
@
|
|
91
|
-
@apply px-8;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
@screen print {
|
|
95
|
-
@apply px-0;
|
|
96
|
-
}
|
|
90
|
+
@apply px-8;
|
|
97
91
|
}
|
|
98
92
|
|
|
99
93
|
.form-card__header {
|
|
@@ -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
|
|