@bloom-housing/ui-components 4.2.2-alpha.9 → 4.3.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 +206 -0
- package/README.md +10 -4
- package/index.ts +12 -10
- package/package.json +6 -4
- package/src/actions/Button.docs.mdx +76 -0
- package/src/actions/Button.scss +58 -61
- 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/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 +3 -0
- package/src/helpers/MultiLineAddress.tsx +37 -0
- package/src/helpers/OneLineAddress.tsx +21 -0
- package/src/helpers/tableSummaries.tsx +34 -23
- package/src/locales/general.json +4 -1
- package/src/navigation/FooterNav.scss +8 -3
- 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 +7 -2
- 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 +1 -1
- package/src/page_components/sign-in/ResendConfirmationModal.tsx +1 -3
- 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,212 @@
|
|
|
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.3](https://github.com/seanmalbert/bloom/compare/@bloom-housing/ui-components@4.2.2...@bloom-housing/ui-components@4.2.3) (2022-04-28)
|
|
7
|
+
## [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)
|
|
8
|
+
|
|
9
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## [4.2.2](https://github.com/seanmalbert/bloom/compare/@bloom-housing/ui-components@4.2.1...@bloom-housing/ui-components@4.2.2) (2022-04-19)
|
|
14
|
+
|
|
15
|
+
## [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)
|
|
16
|
+
|
|
17
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## [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)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* site footer overflowing ([#2719](https://github.com/bloom-housing/bloom/issues/2719)) ([b36b9f3](https://github.com/bloom-housing/bloom/commit/b36b9f3b1acad7a3f030662ac396a2375f0b7db3))
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## [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)
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
### Bug Fixes
|
|
38
|
+
|
|
39
|
+
* 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))
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
## [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)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
### Bug Fixes
|
|
49
|
+
|
|
50
|
+
* footer alignment issue with overflowing links ([#2713](https://github.com/bloom-housing/bloom/issues/2713)) ([b87be1d](https://github.com/bloom-housing/bloom/commit/b87be1da10d59df2616f5df51629a8201baa6f86))
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
## [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)
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Code Refactoring
|
|
60
|
+
|
|
61
|
+
* 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))
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### BREAKING CHANGES
|
|
65
|
+
|
|
66
|
+
* 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
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
## [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)
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
### Code Refactoring
|
|
76
|
+
|
|
77
|
+
* 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))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
### BREAKING CHANGES
|
|
81
|
+
|
|
82
|
+
* the Waitlist component was renamed to QuantityRowSection which also has a new prop set to account for a flexible number of rows and strings
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## [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)
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
### Features
|
|
92
|
+
|
|
93
|
+
* **backend:** improve ami chart dto definitions ([#2677](https://github.com/bloom-housing/bloom/issues/2677)) ([ca3890e](https://github.com/bloom-housing/bloom/commit/ca3890e2759f230824e31e6bd985300f40b0a0ed))
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
## [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)
|
|
100
|
+
|
|
101
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
## [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)
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### Bug Fixes
|
|
111
|
+
|
|
112
|
+
* 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))
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
## [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)
|
|
119
|
+
|
|
120
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
## [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)
|
|
127
|
+
|
|
128
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
## [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)
|
|
135
|
+
|
|
136
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
## [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)
|
|
143
|
+
|
|
144
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
## [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)
|
|
151
|
+
|
|
152
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
## [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)
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
### Features
|
|
162
|
+
|
|
163
|
+
* 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))
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
## [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)
|
|
170
|
+
|
|
171
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
## [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)
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
### Bug Fixes
|
|
181
|
+
|
|
182
|
+
* 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))
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
## [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)
|
|
189
|
+
|
|
190
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
## [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)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
### Features
|
|
200
|
+
|
|
201
|
+
* new category table component ([#2648](https://github.com/bloom-housing/bloom/issues/2648)) ([3b3fe46](https://github.com/bloom-housing/bloom/commit/3b3fe46dda3d0e553664c10cea46849551ce064c))
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
### BREAKING CHANGES
|
|
205
|
+
|
|
206
|
+
* 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.
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
|
|
210
|
+
|
|
211
|
+
|
|
6
212
|
## [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)
|
|
7
213
|
|
|
8
214
|
**Note:** Version bump only for package @bloom-housing/ui-components
|
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"
|
|
@@ -108,14 +109,14 @@ export * from "./src/page_components/listing/ListingMap"
|
|
|
108
109
|
export * from "./src/page_components/listing/ListingsGroup"
|
|
109
110
|
export * from "./src/page_components/listing/UnitTables"
|
|
110
111
|
export * from "./src/page_components/listing/listing_sidebar/GetApplication"
|
|
111
|
-
export * from "./src/page_components/listing/listing_sidebar/
|
|
112
|
+
export * from "./src/page_components/listing/listing_sidebar/Contact"
|
|
112
113
|
export * from "./src/page_components/listing/listing_sidebar/ListingUpdated"
|
|
113
114
|
export * from "./src/page_components/listing/listing_sidebar/NumberedHeader"
|
|
114
115
|
export * from "./src/page_components/listing/listing_sidebar/OrDivider"
|
|
115
116
|
export * from "./src/page_components/listing/listing_sidebar/ReferralApplication"
|
|
116
|
-
export * from "./src/page_components/listing/listing_sidebar/
|
|
117
|
+
export * from "./src/page_components/listing/listing_sidebar/ContactAddress"
|
|
117
118
|
export * from "./src/page_components/listing/listing_sidebar/SubmitApplication"
|
|
118
|
-
export * from "./src/page_components/listing/listing_sidebar/
|
|
119
|
+
export * from "./src/page_components/listing/listing_sidebar/QuantityRowSection"
|
|
119
120
|
export * from "./src/page_components/listing/listing_sidebar/WhatToExpect"
|
|
120
121
|
export * from "./src/page_components/listing/listing_sidebar/events/DownloadLotteryResults"
|
|
121
122
|
export * from "./src/page_components/listing/listing_sidebar/events/EventSection"
|
|
@@ -145,6 +146,7 @@ export * from "./src/tables/StandardTable"
|
|
|
145
146
|
export * from "./src/tables/GroupedTable"
|
|
146
147
|
export * from "./src/tables/MinimalTable"
|
|
147
148
|
export * from "./src/tables/StackedTable"
|
|
149
|
+
export * from "./src/tables/CategoryTable"
|
|
148
150
|
|
|
149
151
|
/* Text */
|
|
150
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.
|
|
3
|
+
"version": "4.3.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",
|
|
@@ -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.
|
|
73
|
+
"@bloom-housing/backend-core": "^4.3.0",
|
|
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": "1a7e221449e2af62cfa67b594779bcf7b900b5fc"
|
|
104
106
|
}
|
|
@@ -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` |
|
package/src/actions/Button.scss
CHANGED
|
@@ -1,59 +1,58 @@
|
|
|
1
1
|
@import "../global/mixins.scss";
|
|
2
2
|
|
|
3
3
|
.button {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@apply font-bold;
|
|
16
|
-
@apply leading-snug;
|
|
4
|
+
position: relative;
|
|
5
|
+
border-radius: var(--normal-rounded, var(--bloom-rounded));
|
|
6
|
+
padding: var(--normal-padding, var(--bloom-s4) var(--bloom-s6));
|
|
7
|
+
text-align: center;
|
|
8
|
+
text-transform: var(--label-transform, uppercase);
|
|
9
|
+
font-family: var(--label-font, var(--bloom-font-alt-sans));
|
|
10
|
+
display: inline-block;
|
|
11
|
+
letter-spacing: var(--label-letter-spacing, var(--bloom-letter-spacing-widest));
|
|
12
|
+
font-size: var(--normal-font-size, var(--bloom-font-size-sm));
|
|
13
|
+
font-weight: var(--label-weight, bold);
|
|
14
|
+
line-height: var(--bloom-line-height-snug);
|
|
17
15
|
|
|
18
16
|
&:focus {
|
|
19
17
|
outline: none;
|
|
20
|
-
box-shadow: 0 0 0 2px #fff, 0 0 3px 4px
|
|
18
|
+
box-shadow: 0 0 0 2px #fff, 0 0 3px 4px var(--bloom-color-accent-cool);
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
&:hover {
|
|
24
|
-
|
|
22
|
+
border-color: var(--bloom-color-primary-dark);
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
&:disabled {
|
|
28
26
|
pointer-events: none;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
background-color: var(--bloom-color-white);
|
|
28
|
+
border-color: var(--bloom-color-gray-450);
|
|
29
|
+
color: var(--bloom-color-gray-450);
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
&.is-secondary {
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
border-color: var(--bloom-color-gray-700);
|
|
34
|
+
color: var(--bloom-color-gray-700);
|
|
37
35
|
|
|
38
36
|
&:hover {
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
background-color: var(--bloom-color-gray-700);
|
|
38
|
+
color: var(--bloom-color-white);
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
&.is-small {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
border-radius: var(--small-rounded, var(--bloom-rounded));
|
|
44
|
+
padding: var(--small-padding, var(--bloom-s3) var(--bloom-s6));
|
|
45
|
+
font-size: var(--small-font-size, var(--bloom-font-size-xs));
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
&.is-big {
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
border-radius: var(--big-rounded, var(--bloom-rounded));
|
|
50
|
+
padding: var(--big-padding, var(--bloom-s6));
|
|
51
|
+
font-size: var(--big-font-size, var(--bloom-font-size-sm));
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
&.is-normal-case {
|
|
56
|
-
|
|
55
|
+
text-transform: none;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
&.is-unstyled {
|
|
@@ -62,74 +61,72 @@
|
|
|
62
61
|
|
|
63
62
|
&.is-unstyled,
|
|
64
63
|
&.is-inline {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
64
|
+
text-transform: none;
|
|
65
|
+
border: none;
|
|
66
|
+
padding: 0;
|
|
67
|
+
font-family: var(--bloom-font-sans);
|
|
68
|
+
letter-spacing: normal;
|
|
69
|
+
font-weight: 400;
|
|
70
|
+
text-decoration: underline;
|
|
71
|
+
margin: var(--bloom-s4);
|
|
72
|
+
font-size: var(--bloom-font-size-tiny);
|
|
74
73
|
|
|
75
74
|
&:hover {
|
|
76
|
-
|
|
75
|
+
color: var(--bloom-color-primary);
|
|
77
76
|
background: transparent;
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
&.is-inline {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
color: var(--bloom-color-primary);
|
|
82
|
+
font-weight: 600;
|
|
83
|
+
font-size: var(--bloom-font-size-tiny);
|
|
84
|
+
margin: 0;
|
|
85
|
+
text-decoration: none;
|
|
87
86
|
|
|
88
87
|
&.has-icon-left {
|
|
89
88
|
.button__icon {
|
|
90
|
-
|
|
89
|
+
margin-right: var(--bloom-s1);
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
92
|
&.has-icon-right {
|
|
94
93
|
.button__icon {
|
|
95
|
-
|
|
94
|
+
margin-left: var(--bloom-s1);
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
98
|
|
|
100
99
|
&.has-icon-left {
|
|
101
100
|
.button__icon {
|
|
102
|
-
|
|
101
|
+
margin-right: var(--bloom-s3);
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
&.has-icon-right {
|
|
106
105
|
.button__icon {
|
|
107
|
-
|
|
106
|
+
margin-left: var(--bloom-s3);
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
&.is-text-caps {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
@apply text-tiny;
|
|
123
|
-
@apply block;
|
|
111
|
+
color: var(--bloom-color-primary-dark);
|
|
112
|
+
border: none;
|
|
113
|
+
padding: 0;
|
|
114
|
+
font-family: var(--bloom-font-sans);
|
|
115
|
+
letter-spacing: normal;
|
|
116
|
+
text-decoration: underline;
|
|
117
|
+
margin: var(--bloom-s4);
|
|
118
|
+
text-transform: uppercase;
|
|
119
|
+
font-size: var(--bloom-font-size-tiny);
|
|
120
|
+
display: block;
|
|
124
121
|
|
|
125
122
|
&:hover {
|
|
126
|
-
|
|
123
|
+
color: var(--bloom-color-primary-dark);
|
|
127
124
|
background: transparent;
|
|
128
125
|
}
|
|
129
126
|
}
|
|
130
127
|
|
|
131
128
|
&.is-fullwidth {
|
|
132
|
-
|
|
129
|
+
width: 100%;
|
|
133
130
|
}
|
|
134
131
|
|
|
135
132
|
&.is-loading {
|
package/src/blocks/DashBlock.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from "react"
|
|
1
|
+
import React, { useContext } from "react"
|
|
2
2
|
import "./DashBlocks.scss"
|
|
3
|
+
import { NavigationContext } from "../config/NavigationContext"
|
|
3
4
|
|
|
4
5
|
interface DashBlockProps {
|
|
5
6
|
href?: string
|
|
@@ -10,6 +11,7 @@ interface DashBlockProps {
|
|
|
10
11
|
dataTestId?: string
|
|
11
12
|
}
|
|
12
13
|
const DashBlock = (props: DashBlockProps) => {
|
|
14
|
+
const { LinkComponent } = useContext(NavigationContext)
|
|
13
15
|
const { href, title, subtitle, icon, children } = props
|
|
14
16
|
let content, wrapper
|
|
15
17
|
if (children) {
|
|
@@ -24,9 +26,9 @@ const DashBlock = (props: DashBlockProps) => {
|
|
|
24
26
|
)
|
|
25
27
|
if (href) {
|
|
26
28
|
wrapper = (
|
|
27
|
-
<
|
|
29
|
+
<LinkComponent href={href} className="dash-item">
|
|
28
30
|
{header}
|
|
29
|
-
</
|
|
31
|
+
</LinkComponent>
|
|
30
32
|
)
|
|
31
33
|
} else {
|
|
32
34
|
wrapper = (
|