@bloom-housing/ui-components 4.2.2-alpha.3 → 4.2.2-alpha.30
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 +273 -0
- package/README.md +10 -4
- package/index.ts +14 -10
- package/package.json +6 -4
- package/scripts/generate-translations.ts +60 -0
- package/src/actions/Button.docs.mdx +76 -0
- package/src/actions/Button.scss +58 -61
- package/src/authentication/timeout.tsx +1 -0
- package/src/blocks/DashBlock.tsx +5 -3
- package/src/blocks/DashBlocks.scss +4 -1
- package/src/global/app-css.scss +7 -0
- package/src/global/markdown.scss +20 -0
- package/src/global/mixins.scss +66 -49
- package/src/global/tables.scss +236 -58
- package/src/global/text.scss +11 -3
- package/src/global/tokens/borders.scss +15 -0
- package/src/global/tokens/colors.scss +64 -0
- package/src/global/tokens/fonts.scss +45 -0
- package/src/global/tokens/screens.scss +6 -0
- package/src/global/tokens/sizes.scss +48 -0
- package/src/headers/Heading.tsx +2 -0
- package/src/headers/PageHeader.docs.mdx +45 -0
- package/src/headers/PageHeader.scss +30 -17
- package/src/headers/PageHeader.tsx +2 -10
- package/src/headers/SiteHeader.tsx +7 -1
- package/src/helpers/MultiLineAddress.tsx +37 -0
- package/src/helpers/OneLineAddress.tsx +21 -0
- package/src/helpers/tableSummaries.tsx +34 -23
- package/src/locales/es.json +165 -33
- package/src/locales/general.json +18 -9
- package/src/locales/tl.json +655 -1
- package/src/locales/vi.json +165 -33
- package/src/locales/zh.json +165 -33
- package/src/navigation/FooterNav.scss +9 -3
- package/src/overlays/Drawer.tsx +11 -3
- package/src/overlays/Modal.tsx +16 -7
- package/src/overlays/Overlay.tsx +4 -3
- package/src/page_components/ApplicationTimeline.scss +36 -0
- package/src/page_components/ApplicationTimeline.tsx +33 -0
- package/src/page_components/forgot-password/FormForgotPassword.tsx +5 -4
- package/src/page_components/listing/AdditionalFees.tsx +38 -31
- package/src/page_components/listing/ListingCard.scss +12 -0
- package/src/page_components/listing/ListingCard.tsx +5 -3
- package/src/page_components/listing/ListingMap.tsx +8 -3
- package/src/page_components/listing/UnitTables.tsx +19 -18
- package/src/page_components/listing/listing_sidebar/Contact.tsx +110 -0
- package/src/page_components/listing/listing_sidebar/ContactAddress.tsx +41 -0
- package/src/page_components/listing/listing_sidebar/GetApplication.tsx +35 -15
- package/src/page_components/listing/listing_sidebar/QuantityRowSection.tsx +46 -0
- package/src/page_components/listing/listing_sidebar/SubmitApplication.tsx +52 -57
- package/src/page_components/listing/listing_sidebar/events/EventSection.tsx +3 -2
- package/src/page_components/sign-in/FormSignIn.tsx +2 -1
- package/src/page_components/sign-in/ResendConfirmationModal.tsx +106 -0
- package/src/prototypes/Swatch.tsx +10 -0
- package/src/tables/CategoryTable.tsx +33 -0
- package/src/tables/GroupedTable.tsx +5 -5
- package/src/tables/MinimalTable.tsx +12 -2
- package/src/tables/StackedTable.tsx +38 -26
- package/src/tables/StandardTable.tsx +26 -10
- package/tailwind.config.js +76 -81
- package/tailwind.tosass.js +2 -1
- package/src/helpers/address.tsx +0 -46
- package/src/page_components/listing/listing_sidebar/LeasingAgent.tsx +0 -72
- package/src/page_components/listing/listing_sidebar/SidebarAddress.tsx +0 -56
- package/src/page_components/listing/listing_sidebar/Waitlist.tsx +0 -49
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,279 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [4.2.2-alpha.30](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.29...@bloom-housing/ui-components@4.2.2-alpha.30) (2022-05-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* missing translations, script to merge new translations ([#2728](https://github.com/bloom-housing/bloom/issues/2728)) ([1abc50d](https://github.com/bloom-housing/bloom/commit/1abc50de6b3311e92d47292b6f5ec69bf4c5094a))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [4.2.2-alpha.29](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.28...@bloom-housing/ui-components@4.2.2-alpha.29) (2022-05-11)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [4.2.2-alpha.28](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.27...@bloom-housing/ui-components@4.2.2-alpha.28) (2022-05-11)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [4.2.2-alpha.27](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.26...@bloom-housing/ui-components@4.2.2-alpha.27) (2022-05-10)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Bug Fixes
|
|
37
|
+
|
|
38
|
+
* site footer overflowing ([#2719](https://github.com/bloom-housing/bloom/issues/2719)) ([b36b9f3](https://github.com/bloom-housing/bloom/commit/b36b9f3b1acad7a3f030662ac396a2375f0b7db3))
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
## [4.2.2-alpha.26](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.25...@bloom-housing/ui-components@4.2.2-alpha.26) (2022-05-05)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
* use appropriate copy for FCFS vs Lottery in Application Confirmation screen ([#2702](https://github.com/bloom-housing/bloom/issues/2702)) ([5289504](https://github.com/bloom-housing/bloom/commit/52895044cba64eeb7789c68f0a5eb957785055b5))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## [4.2.2-alpha.25](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.24...@bloom-housing/ui-components@4.2.2-alpha.25) (2022-05-04)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
### Bug Fixes
|
|
59
|
+
|
|
60
|
+
* footer alignment issue with overflowing links ([#2713](https://github.com/bloom-housing/bloom/issues/2713)) ([b87be1d](https://github.com/bloom-housing/bloom/commit/b87be1da10d59df2616f5df51629a8201baa6f86))
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
## [4.2.2-alpha.24](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.23...@bloom-housing/ui-components@4.2.2-alpha.24) (2022-05-04)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
### Code Refactoring
|
|
70
|
+
|
|
71
|
+
* remove backend dependencies from sidebar application components ([#2675](https://github.com/bloom-housing/bloom/issues/2675)) ([d2ebf87](https://github.com/bloom-housing/bloom/commit/d2ebf87c34af3f5b6168fa4e08663fea0a4a872c))
|
|
72
|
+
|
|
73
|
+
|
|
74
|
+
### BREAKING CHANGES
|
|
75
|
+
|
|
76
|
+
* the LeasingAgent component has been renamed to Contact with a new generalized prop set, the SidebarAddress component has been renamed to ContactAddress with a new generalized prop set
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
## [4.2.2-alpha.23](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.22...@bloom-housing/ui-components@4.2.2-alpha.23) (2022-05-04)
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
### Code Refactoring
|
|
86
|
+
|
|
87
|
+
* remove business logic, strings from waitlist component ([#2689](https://github.com/bloom-housing/bloom/issues/2689)) ([a5721db](https://github.com/bloom-housing/bloom/commit/a5721db518453ddbd777e50ca92fdeac19997aa9))
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
### BREAKING CHANGES
|
|
91
|
+
|
|
92
|
+
* the Waitlist component was renamed to QuantityRowSection which also has a new prop set to account for a flexible number of rows and strings
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
## [4.2.2-alpha.22](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.21...@bloom-housing/ui-components@4.2.2-alpha.22) (2022-05-03)
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
### Features
|
|
102
|
+
|
|
103
|
+
* **backend:** improve ami chart dto definitions ([#2677](https://github.com/bloom-housing/bloom/issues/2677)) ([ca3890e](https://github.com/bloom-housing/bloom/commit/ca3890e2759f230824e31e6bd985300f40b0a0ed))
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
## [4.2.2-alpha.21](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.20...@bloom-housing/ui-components@4.2.2-alpha.21) (2022-04-29)
|
|
110
|
+
|
|
111
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
## [4.2.2-alpha.20](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.19...@bloom-housing/ui-components@4.2.2-alpha.20) (2022-04-29)
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
### Bug Fixes
|
|
121
|
+
|
|
122
|
+
* ux updates for new listing card design ([#2687](https://github.com/bloom-housing/bloom/issues/2687)) ([c8814ae](https://github.com/bloom-housing/bloom/commit/c8814ae57b62fa6f932017bb70d47663b09fca1a))
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
## [4.2.2-alpha.19](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.18...@bloom-housing/ui-components@4.2.2-alpha.19) (2022-04-28)
|
|
129
|
+
|
|
130
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
## [4.2.2-alpha.18](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.17...@bloom-housing/ui-components@4.2.2-alpha.18) (2022-04-28)
|
|
137
|
+
|
|
138
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
## [4.2.2-alpha.17](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.16...@bloom-housing/ui-components@4.2.2-alpha.17) (2022-04-28)
|
|
145
|
+
|
|
146
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
## [4.2.2-alpha.16](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.15...@bloom-housing/ui-components@4.2.2-alpha.16) (2022-04-27)
|
|
153
|
+
|
|
154
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
## [4.2.2-alpha.15](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.14...@bloom-housing/ui-components@4.2.2-alpha.15) (2022-04-26)
|
|
161
|
+
|
|
162
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## [4.2.2-alpha.14](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.13...@bloom-housing/ui-components@4.2.2-alpha.14) (2022-04-22)
|
|
169
|
+
|
|
170
|
+
|
|
171
|
+
### Features
|
|
172
|
+
|
|
173
|
+
* swap anchor tags with LinkComponent for language routes ([#2686](https://github.com/bloom-housing/bloom/issues/2686)) ([a397930](https://github.com/bloom-housing/bloom/commit/a3979306fe39acd7b424a9e7364d791ad77fa2d0))
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
## [4.2.2-alpha.13](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.12...@bloom-housing/ui-components@4.2.2-alpha.13) (2022-04-22)
|
|
180
|
+
|
|
181
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
## [4.2.2-alpha.12](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.11...@bloom-housing/ui-components@4.2.2-alpha.12) (2022-04-22)
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
### Bug Fixes
|
|
191
|
+
|
|
192
|
+
* forgot password empty warning and two minor style changes ([#2680](https://github.com/bloom-housing/bloom/issues/2680)) ([01f1519](https://github.com/bloom-housing/bloom/commit/01f15194e2de8595a772c8c87f455d882e47f164))
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
## [4.2.2-alpha.11](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.10...@bloom-housing/ui-components@4.2.2-alpha.11) (2022-04-21)
|
|
199
|
+
|
|
200
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
## [4.2.2-alpha.10](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.9...@bloom-housing/ui-components@4.2.2-alpha.10) (2022-04-21)
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
### Features
|
|
210
|
+
|
|
211
|
+
* new category table component ([#2648](https://github.com/bloom-housing/bloom/issues/2648)) ([3b3fe46](https://github.com/bloom-housing/bloom/commit/3b3fe46dda3d0e553664c10cea46849551ce064c))
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
### BREAKING CHANGES
|
|
215
|
+
|
|
216
|
+
* There is a new prop interface for the StandardTable component and all components that use it, which includes passing cell content within a new object, allowing us to support new cell options - all tables will need to pass data with the new format.
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
## [4.2.2-alpha.9](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.8...@bloom-housing/ui-components@4.2.2-alpha.9) (2022-04-20)
|
|
223
|
+
|
|
224
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
225
|
+
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
## [4.2.2-alpha.8](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.7...@bloom-housing/ui-components@4.2.2-alpha.8) (2022-04-20)
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
### Features
|
|
234
|
+
|
|
235
|
+
* application timeout screen reader accessible ([#2625](https://github.com/bloom-housing/bloom/issues/2625)) ([0771ef3](https://github.com/bloom-housing/bloom/commit/0771ef3f7e4001efb4dae8cca06743801daace05))
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
## [4.2.2-alpha.7](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.6...@bloom-housing/ui-components@4.2.2-alpha.7) (2022-04-20)
|
|
242
|
+
|
|
243
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
## [4.2.2-alpha.6](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.5...@bloom-housing/ui-components@4.2.2-alpha.6) (2022-04-20)
|
|
250
|
+
|
|
251
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
252
|
+
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
|
|
257
|
+
## [4.2.2-alpha.5](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.4...@bloom-housing/ui-components@4.2.2-alpha.5) (2022-04-19)
|
|
258
|
+
|
|
259
|
+
|
|
260
|
+
### Bug Fixes
|
|
261
|
+
|
|
262
|
+
* footer nav widths ([42aef6f](https://github.com/bloom-housing/bloom/commit/42aef6f74a8a7e27c6bdb870cb6c69c7569f41c0))
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
## [4.2.2-alpha.4](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.3...@bloom-housing/ui-components@4.2.2-alpha.4) (2022-04-18)
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
### Bug Fixes
|
|
272
|
+
|
|
273
|
+
* add optional prop for Language Nav aria label ([#2672](https://github.com/bloom-housing/bloom/issues/2672)) ([5f1b3f6](https://github.com/bloom-housing/bloom/commit/5f1b3f66f5269cfd9285b958f608cdb41e779c70))
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
|
|
6
279
|
## [4.2.2-alpha.3](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.2.2-alpha.2...@bloom-housing/ui-components@4.2.2-alpha.3) (2022-04-18)
|
|
7
280
|
|
|
8
281
|
|
package/README.md
CHANGED
|
@@ -46,16 +46,22 @@ yarn test:a11y
|
|
|
46
46
|
|
|
47
47
|
## Tailwind
|
|
48
48
|
|
|
49
|
-
- We are using the [Tailwind](https://
|
|
49
|
+
- We are using the [Tailwind](https://v2.tailwindcss.com) framework to make use of their low-level utility classes in page-level markup and sometimes in components. We configure the settings in `tailwind.config.js`.
|
|
50
50
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
Vendor Plugins
|
|
51
|
+
## Vendor Plugins
|
|
54
52
|
|
|
55
53
|
- [AG Grid](https://www.ag-grid.com)
|
|
56
54
|
|
|
57
55
|
## Style Conventions
|
|
58
56
|
|
|
57
|
+
- Some styles live in a global folder, but for the most part our components are styled with isolated SCSS files located alongside React component TS files.
|
|
58
|
+
|
|
59
|
+
- We are currently in the process of migrating components to a second-generation styling convention which relies on CSS variables for design tokens and generally removes `@apply` Tailwind statements.
|
|
60
|
+
|
|
61
|
+
- Bloom design tokens include colors, typography settings, sizes, borders, and so forth. They're located in the `src/global/tokens` folder.
|
|
62
|
+
|
|
63
|
+
- More information on this process can be found in [Styling2ndGen.md](https://github.com/bloom-housing/bloom/blob/dev/docs/Styling2ndGen.md).
|
|
64
|
+
|
|
59
65
|
### Naming Conventions
|
|
60
66
|
|
|
61
67
|
- Our recommendation for class naming methodology is a modified version of BEM. It still uses blocks, sections within blocks and modifiers, but with a subclass syntax for modifiers.
|
package/index.ts
CHANGED
|
@@ -52,23 +52,24 @@ export * from "./src/headers/SiteHeader"
|
|
|
52
52
|
export * from "./src/headers/Heading"
|
|
53
53
|
|
|
54
54
|
/* Helpers */
|
|
55
|
-
export * from "./src/helpers/address"
|
|
56
55
|
export * from "./src/helpers/capitalize"
|
|
57
56
|
export * from "./src/helpers/dateToString"
|
|
57
|
+
export * from "./src/helpers/debounce"
|
|
58
58
|
export * from "./src/helpers/formOptions"
|
|
59
|
+
export * from "./src/helpers/formatYesNoLabel"
|
|
60
|
+
export * from "./src/helpers/getTranslationWithArguments"
|
|
59
61
|
export * from "./src/helpers/links"
|
|
60
62
|
export * from "./src/helpers/mergeDeep"
|
|
63
|
+
export * from "./src/helpers/MultiLineAddress"
|
|
61
64
|
export * from "./src/helpers/numberOrdinal"
|
|
62
|
-
export * from "./src/helpers/
|
|
63
|
-
export * from "./src/helpers/debounce"
|
|
64
|
-
export * from "./src/helpers/validators"
|
|
65
|
-
export * from "./src/helpers/formatYesNoLabel"
|
|
66
|
-
export * from "./src/helpers/getTranslationWithArguments"
|
|
65
|
+
export * from "./src/helpers/OneLineAddress"
|
|
67
66
|
export * from "./src/helpers/preferences"
|
|
68
67
|
export * from "./src/helpers/resolveObject"
|
|
68
|
+
export * from "./src/helpers/tableSummaries"
|
|
69
|
+
export * from "./src/helpers/translator"
|
|
69
70
|
export * from "./src/helpers/useIntersect"
|
|
70
71
|
export * from "./src/helpers/useMutate"
|
|
71
|
-
export * from "./src/helpers/
|
|
72
|
+
export * from "./src/helpers/validators"
|
|
72
73
|
|
|
73
74
|
/* Icons */
|
|
74
75
|
export * from "./src/icons/HeaderBadge"
|
|
@@ -98,6 +99,7 @@ export * from "./src/overlays/Drawer"
|
|
|
98
99
|
export * from "./src/overlays/LoadingOverlay"
|
|
99
100
|
|
|
100
101
|
/* Page Components */
|
|
102
|
+
export * from "./src/page_components/ApplicationTimeline"
|
|
101
103
|
export * from "./src/page_components/listing/AdditionalFees"
|
|
102
104
|
export * from "./src/page_components/listing/ContentAccordion"
|
|
103
105
|
export * from "./src/page_components/listing/ListingCard"
|
|
@@ -107,18 +109,19 @@ export * from "./src/page_components/listing/ListingMap"
|
|
|
107
109
|
export * from "./src/page_components/listing/ListingsGroup"
|
|
108
110
|
export * from "./src/page_components/listing/UnitTables"
|
|
109
111
|
export * from "./src/page_components/listing/listing_sidebar/GetApplication"
|
|
110
|
-
export * from "./src/page_components/listing/listing_sidebar/
|
|
112
|
+
export * from "./src/page_components/listing/listing_sidebar/Contact"
|
|
111
113
|
export * from "./src/page_components/listing/listing_sidebar/ListingUpdated"
|
|
112
114
|
export * from "./src/page_components/listing/listing_sidebar/NumberedHeader"
|
|
113
115
|
export * from "./src/page_components/listing/listing_sidebar/OrDivider"
|
|
114
116
|
export * from "./src/page_components/listing/listing_sidebar/ReferralApplication"
|
|
115
|
-
export * from "./src/page_components/listing/listing_sidebar/
|
|
117
|
+
export * from "./src/page_components/listing/listing_sidebar/ContactAddress"
|
|
116
118
|
export * from "./src/page_components/listing/listing_sidebar/SubmitApplication"
|
|
117
|
-
export * from "./src/page_components/listing/listing_sidebar/
|
|
119
|
+
export * from "./src/page_components/listing/listing_sidebar/QuantityRowSection"
|
|
118
120
|
export * from "./src/page_components/listing/listing_sidebar/WhatToExpect"
|
|
119
121
|
export * from "./src/page_components/listing/listing_sidebar/events/DownloadLotteryResults"
|
|
120
122
|
export * from "./src/page_components/listing/listing_sidebar/events/EventSection"
|
|
121
123
|
export * from "./src/page_components/sign-in/FormTerms"
|
|
124
|
+
export * from "./src/page_components/sign-in/ResendConfirmationModal"
|
|
122
125
|
export * from "./src/page_components/sign-in/FormSignIn"
|
|
123
126
|
export * from "./src/page_components/sign-in/FormSignInMFAType"
|
|
124
127
|
export * from "./src/page_components/sign-in/FormSignInMFACode"
|
|
@@ -143,6 +146,7 @@ export * from "./src/tables/StandardTable"
|
|
|
143
146
|
export * from "./src/tables/GroupedTable"
|
|
144
147
|
export * from "./src/tables/MinimalTable"
|
|
145
148
|
export * from "./src/tables/StackedTable"
|
|
149
|
+
export * from "./src/tables/CategoryTable"
|
|
146
150
|
|
|
147
151
|
/* Text */
|
|
148
152
|
export * from "./src/text/Description"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloom-housing/ui-components",
|
|
3
|
-
"version": "4.2.2-alpha.
|
|
3
|
+
"version": "4.2.2-alpha.30",
|
|
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",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"@babel/preset-env": "^7.15.4",
|
|
25
25
|
"@emotion/core": "^10.0.35",
|
|
26
26
|
"@emotion/styled": "^10.0.27",
|
|
27
|
+
"@geometricpanda/storybook-addon-badges": "^0.2.1",
|
|
27
28
|
"@storybook/addon-a11y": "^6.3.8",
|
|
28
29
|
"@storybook/addon-actions": "^6.3.8",
|
|
29
30
|
"@storybook/addon-docs": "^6.3.8",
|
|
@@ -65,15 +66,16 @@
|
|
|
65
66
|
"style-loader": "^1.1.3",
|
|
66
67
|
"ts-jest": "^26.4.1",
|
|
67
68
|
"ts-loader": "^8.0.4",
|
|
68
|
-
"typescript": "^
|
|
69
|
+
"typescript": "^4.5.5",
|
|
69
70
|
"webpack": "^4.44.2"
|
|
70
71
|
},
|
|
71
72
|
"dependencies": {
|
|
72
|
-
"@bloom-housing/backend-core": "^4.2.2-alpha.
|
|
73
|
+
"@bloom-housing/backend-core": "^4.2.2-alpha.9",
|
|
73
74
|
"@mapbox/mapbox-sdk": "^0.13.0",
|
|
74
75
|
"@types/body-scroll-lock": "^2.6.1",
|
|
75
76
|
"@types/jwt-decode": "^2.2.1",
|
|
76
77
|
"@types/markdown-to-jsx": "^6.11.2",
|
|
78
|
+
"@types/mdx": "^2.0.1",
|
|
77
79
|
"@types/node": "^12.12.67",
|
|
78
80
|
"@types/node-polyglot": "^2.4.1",
|
|
79
81
|
"@types/react-beautiful-dnd": "^13.1.1",
|
|
@@ -100,5 +102,5 @@
|
|
|
100
102
|
"tailwindcss": "2.2.10",
|
|
101
103
|
"typesafe-actions": "^5.1.0"
|
|
102
104
|
},
|
|
103
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "45e070c511b6c92e239780f025a8e546a797faf5"
|
|
104
106
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/* eslint-disable @typescript-eslint/no-var-requires */
|
|
2
|
+
// Prints out a combination of an inputted csv file and existing translations file
|
|
3
|
+
// The CSV of the new translations must be in the format "key,value"
|
|
4
|
+
// Temporarily update the ui-components tsconfig to include `"module": "commonjs"`
|
|
5
|
+
// example: `ts-node generate-translations es new-spanish.csv > merged-spanish-translations.json`
|
|
6
|
+
const fs = require("fs")
|
|
7
|
+
const general = require("../src/locales/general.json")
|
|
8
|
+
const es = require("../src/locales/es.json")
|
|
9
|
+
const zh = require("../src/locales/zh.json")
|
|
10
|
+
const vi = require("../src/locales/vi.json")
|
|
11
|
+
const tl = require("../src/locales/tl.json")
|
|
12
|
+
|
|
13
|
+
function main() {
|
|
14
|
+
if (process.argv.length < 4) {
|
|
15
|
+
console.log(
|
|
16
|
+
"usage: ts-node generate-translations es new-spanish.csv > merged-spanish-translations.json"
|
|
17
|
+
)
|
|
18
|
+
process.exit(1)
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const languageMap = {
|
|
22
|
+
general: general,
|
|
23
|
+
es: es,
|
|
24
|
+
zh: zh,
|
|
25
|
+
vi: vi,
|
|
26
|
+
tl: tl,
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
const [language, filePath] = process.argv.slice(2)
|
|
30
|
+
|
|
31
|
+
// Process existing keys
|
|
32
|
+
const mergedTranslations: string[] = []
|
|
33
|
+
Object.keys(languageMap[language]).forEach((key) => {
|
|
34
|
+
const formattedTranslation = `"${key}": "${languageMap[language][key]}",`
|
|
35
|
+
mergedTranslations.push(JSON.stringify(formattedTranslation))
|
|
36
|
+
})
|
|
37
|
+
|
|
38
|
+
// Add new keys if not present
|
|
39
|
+
const newTranslationsFile: any = fs.readFileSync(filePath, "utf-8")
|
|
40
|
+
const newTranslations = newTranslationsFile.split("\n")
|
|
41
|
+
newTranslations.forEach((translation: string) => {
|
|
42
|
+
const [key, ...values] = translation.split(",")
|
|
43
|
+
const value = values.join("_")
|
|
44
|
+
if (!mergedTranslations[key]) {
|
|
45
|
+
const formattedTranslation = `"${key}": "${value}",`
|
|
46
|
+
mergedTranslations.push(JSON.stringify(formattedTranslation))
|
|
47
|
+
}
|
|
48
|
+
})
|
|
49
|
+
|
|
50
|
+
mergedTranslations.sort()
|
|
51
|
+
console.log("{")
|
|
52
|
+
mergedTranslations.forEach((translation) => {
|
|
53
|
+
console.log(JSON.parse(translation))
|
|
54
|
+
})
|
|
55
|
+
console.log("}")
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
void main()
|
|
59
|
+
|
|
60
|
+
export {}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Canvas, Story, Source, ArgsTable } from "@storybook/addon-docs"
|
|
2
|
+
import { Swatch } from "../prototypes/Swatch"
|
|
3
|
+
import { Button } from "./Button"
|
|
4
|
+
|
|
5
|
+
# Button
|
|
6
|
+
|
|
7
|
+
The button component offers flexible usage with a variety of different appearance options. Size, color, and shape can be controlled via standardized props.
|
|
8
|
+
|
|
9
|
+
<Canvas>
|
|
10
|
+
<Button>This is a Button</Button>
|
|
11
|
+
</Canvas>
|
|
12
|
+
|
|
13
|
+
## Variants
|
|
14
|
+
|
|
15
|
+
There are several props which accept enums to adjust style type, border, and size. For example, to choose the "primary" style and a "small" size, you would pass the `AppearanceStyleType.primary` enum to `styleType` prop and `AppearanceSizeType.small` enum to `size` prop.
|
|
16
|
+
|
|
17
|
+
<Canvas>
|
|
18
|
+
<Story id="actions-button--small-and-primary" />
|
|
19
|
+
</Canvas>
|
|
20
|
+
|
|
21
|
+
Other variants include appearances which aren't button-like such as `unstyled` and `inline`.
|
|
22
|
+
|
|
23
|
+
## Component Properties
|
|
24
|
+
|
|
25
|
+
<ArgsTable of={Button} />
|
|
26
|
+
|
|
27
|
+
## Theming Variables
|
|
28
|
+
|
|
29
|
+
You can apply CSS variables to the `.button` selector to customize the appearance of the component.
|
|
30
|
+
|
|
31
|
+
### Color Variables
|
|
32
|
+
|
|
33
|
+
| Name | Color | Description |
|
|
34
|
+
| --------------------------------------------- | ------------------------------------------------ | ------------------------------------ |
|
|
35
|
+
| `--primary-appearance-background-color` | <Swatch colorVar="--bloom-color-primary" /> | Primary background color |
|
|
36
|
+
| `--primary-appearance-border-color` | <Swatch colorVar="--bloom-color-primary" /> | Primary border color |
|
|
37
|
+
| `--primary-appearance-label-color` | <Swatch colorVar="--bloom-color-white" /> | Primary label color |
|
|
38
|
+
| `--primary-appearance-hover-background-color` | <Swatch colorVar="--bloom-color-primary-dark" /> | Hover state primary background color |
|
|
39
|
+
| `--primary-appearance-hover-border-color` | <Swatch colorVar="--bloom-color-primary-dark" /> | Hover state primary border color |
|
|
40
|
+
| `--primary-appearance-hover-label-color` | <Swatch colorVar="--bloom-color-white" /> | Hover state primary label color |
|
|
41
|
+
| `--success-appearance-background-color` | <Swatch colorVar="--bloom-color-success" /> | Success background color |
|
|
42
|
+
| `--success-appearance-border-color` | <Swatch colorVar="--bloom-color-success" /> | Success border color |
|
|
43
|
+
| `--success-appearance-label-color` | <Swatch colorVar="--bloom-color-white" /> | Success label color |
|
|
44
|
+
| `--success-appearance-hover-background-color` | <Swatch colorVar="--bloom-color-success-dark" /> | Hover state success background color |
|
|
45
|
+
| `--success-appearance-hover-border-color` | <Swatch colorVar="--bloom-color-success" /> | Hover state success border color |
|
|
46
|
+
| `--success-appearance-hover-label-color` | <Swatch colorVar="--bloom-color-white" /> | Hover state success label color |
|
|
47
|
+
| `--alert-appearance-background-color` | <Swatch colorVar="--bloom-color-alert" /> | Alert background color |
|
|
48
|
+
| `--alert-appearance-border-color` | <Swatch colorVar="--bloom-color-alert" /> | Alert border color |
|
|
49
|
+
| `--alert-appearance-label-color` | <Swatch colorVar="--bloom-color-white" /> | Alert label color |
|
|
50
|
+
| `--alert-appearance-hover-background-color` | <Swatch colorVar="--bloom-color-alert-dark" /> | Hover state alert background color |
|
|
51
|
+
| `--alert-appearance-hover-border-color` | <Swatch colorVar="--bloom-color-alert" /> | Hover state alert border color |
|
|
52
|
+
| `--alert-appearance-hover-label-color` | <Swatch colorVar="--bloom-color-white" /> | Hover state alert label color |
|
|
53
|
+
| `--warn-appearance-background-color` | <Swatch colorVar="--bloom-color-warn" /> | Warning background color |
|
|
54
|
+
| `--warn-appearance-border-color` | <Swatch colorVar="--bloom-color-warn" /> | Warning border color |
|
|
55
|
+
| `--warn-appearance-label-color` | <Swatch colorVar="--bloom-color-white" /> | Warning label color |
|
|
56
|
+
| `--warn-appearance-hover-background-color` | <Swatch colorVar="--bloom-color-warn-dark" /> | Hover state warning background color |
|
|
57
|
+
| `--warn-appearance-hover-border-color` | <Swatch colorVar="--bloom-color-warn" /> | Hover state warning border color |
|
|
58
|
+
| `--warn-appearance-hover-label-color` | <Swatch colorVar="--bloom-color-white" /> | Hover state warning label color |
|
|
59
|
+
|
|
60
|
+
### Typographic & Spacing Variables
|
|
61
|
+
|
|
62
|
+
| Name | Type | Description | Default |
|
|
63
|
+
| ------------------------ | ----------- | --------------------------------------------------- | --------------------------------------------------- |
|
|
64
|
+
| `--label-font` | Font | Font family of the button label | `--bloom-font-alt-sans` |
|
|
65
|
+
| `--label-transform` | Case | Text case of the button label | `uppercase` |
|
|
66
|
+
| `--label-letter-spacing` | Size | The average gap between letters of the button label | `--bloom-letter-spacing-widest` |
|
|
67
|
+
| `--label-weight` | Font Weight | Typographic weight of the button label | `bold` |
|
|
68
|
+
| `--normal-rounded` | Size | Border radius of a normal-size button | `--bloom-rounded` |
|
|
69
|
+
| `--normal-padding` | Size | Padding of the normal-size button interior | `--bloom-s4` (top/bottom) `--bloom-s6` (left/right) |
|
|
70
|
+
| `--normal-font-size` | Size | Font size of the normal-size button | `--bloom-font-size-sm` |
|
|
71
|
+
| `--small-rounded` | Size | Border radius of a small-size button | `--bloom-rounded` |
|
|
72
|
+
| `--small-padding` | Size | Padding of the small-size button interior | `--bloom-s3` (top/bottom) `--bloom-s6` (left/right) |
|
|
73
|
+
| `--small-font-size` | Size | Font size of the small-size button | `--bloom-font-size-xs` |
|
|
74
|
+
| `--big-rounded` | Size | Border radius of a large-size button | `--bloom-rounded` |
|
|
75
|
+
| `--big-padding` | Size | Padding of the large-size button interior | `--bloom-s6` |
|
|
76
|
+
| `--big-font-size` | Size | Font size of the large-size button | `--bloom-font-size-sm` |
|