@bloom-housing/ui-components 7.0.1 → 7.0.2-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/package.json +3 -4
- package/src/blocks/ImageCard.tsx +2 -2
- package/src/global/vendor/ag_grid.scss +0 -3
- package/src/headers/PageHeader.scss +1 -0
- package/src/overlays/Modal.scss +28 -6
- package/src/overlays/Modal.tsx +11 -12
- package/src/overlays/Overlay.tsx +4 -14
- package/src/page_components/sign-in/ResendConfirmationModal.tsx +3 -0
- package/src/tables/AgTable.tsx +6 -3
- package/tailwind.config.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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
|
+
## [7.0.2-alpha.1](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@7.0.2-alpha.0...@bloom-housing/ui-components@7.0.2-alpha.1) (2022-11-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* allow for more space for modals on mobile ([#3153](https://github.com/bloom-housing/bloom/issues/3153)) ([7e41703](https://github.com/bloom-housing/bloom/commit/7e41703ad8571eb160f4eaf53f40f9055f7639a3))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [7.0.2-alpha.0](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@7.0.1...@bloom-housing/ui-components@7.0.2-alpha.0) (2022-10-31)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @bloom-housing/ui-components
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [7.0.1](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@7.0.1-alpha.4...@bloom-housing/ui-components@7.0.1) (2022-10-26)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @bloom-housing/ui-components
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloom-housing/ui-components",
|
|
3
|
-
"version": "7.0.1",
|
|
3
|
+
"version": "7.0.2-alpha.1",
|
|
4
4
|
"author": "Sean Albert <sean.albert@exygy.com>",
|
|
5
5
|
"description": "Shared user interface components for Bloom affordable housing system",
|
|
6
6
|
"homepage": "https://github.com/bloom-housing/bloom/tree/master/shared/ui-components",
|
|
@@ -78,7 +78,6 @@
|
|
|
78
78
|
"@fortawesome/free-solid-svg-icons": "^6.1.1",
|
|
79
79
|
"@fortawesome/react-fontawesome": "^0.1.18",
|
|
80
80
|
"@mapbox/mapbox-sdk": "^0.13.0",
|
|
81
|
-
"@types/body-scroll-lock": "^2.6.1",
|
|
82
81
|
"@types/jwt-decode": "^2.2.1",
|
|
83
82
|
"@types/markdown-to-jsx": "^6.11.2",
|
|
84
83
|
"@types/mdx": "^2.0.1",
|
|
@@ -92,7 +91,6 @@
|
|
|
92
91
|
"ag-grid-react": "^26.0.0",
|
|
93
92
|
"aria-autocomplete": "^1.4.0",
|
|
94
93
|
"axios": "0.21.2",
|
|
95
|
-
"body-scroll-lock": "^3.1.5",
|
|
96
94
|
"dayjs": "^1.10.7",
|
|
97
95
|
"jwt-decode": "^2.2.0",
|
|
98
96
|
"markdown-to-jsx": "^6.11.4",
|
|
@@ -106,6 +104,7 @@
|
|
|
106
104
|
"react-focus-lock": "^2.5.2",
|
|
107
105
|
"react-map-gl": "^6.1.16",
|
|
108
106
|
"react-media": "^1.10.0",
|
|
107
|
+
"react-remove-scroll": "2.5.4",
|
|
109
108
|
"react-tabs": "^3.2.2",
|
|
110
109
|
"react-text-mask": "^5.4.3",
|
|
111
110
|
"react-transition-group": "^4.4.1",
|
|
@@ -113,5 +112,5 @@
|
|
|
113
112
|
"ts-jest": "^26.4.1",
|
|
114
113
|
"typesafe-actions": "^5.1.0"
|
|
115
114
|
},
|
|
116
|
-
"gitHead": "
|
|
115
|
+
"gitHead": "a2533b31708dc867b12492818815bb1e3b1599a7"
|
|
117
116
|
}
|
package/src/blocks/ImageCard.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import { ApplicationStatus } from "../notifications/ApplicationStatus"
|
|
|
4
4
|
import "./ImageCard.scss"
|
|
5
5
|
import { Tag } from "../text/Tag"
|
|
6
6
|
import { ApplicationStatusType } from "../global/ApplicationStatusType"
|
|
7
|
-
import { AppearanceStyleType } from "../global/AppearanceTypes"
|
|
7
|
+
import { AppearanceSizeType, AppearanceStyleType } from "../global/AppearanceTypes"
|
|
8
8
|
import { Icon, IconFillColors, UniversalIconType } from "../icons/Icon"
|
|
9
9
|
import { Modal } from "../overlays/Modal"
|
|
10
10
|
import { Button } from "../actions/Button"
|
|
@@ -185,7 +185,7 @@ const ImageCard = (props: ImageCardProps) => {
|
|
|
185
185
|
headerClassNames="sr-only"
|
|
186
186
|
closeIconColor={IconFillColors.white}
|
|
187
187
|
actions={[
|
|
188
|
-
<Button onClick={() => setShowModal(!showModal)}>
|
|
188
|
+
<Button onClick={() => setShowModal(!showModal)} size={AppearanceSizeType.small}>
|
|
189
189
|
{props.modalCloseLabel || "Close"}
|
|
190
190
|
</Button>,
|
|
191
191
|
]}
|
|
@@ -111,14 +111,11 @@
|
|
|
111
111
|
|
|
112
112
|
.ag-body-horizontal-scroll {
|
|
113
113
|
border-bottom: 1px solid var(--bloom-color-gray-500);
|
|
114
|
-
border-radius: var(--bloom-rounded-md);
|
|
115
114
|
}
|
|
116
115
|
|
|
117
116
|
.ag-root-wrapper {
|
|
118
117
|
@apply border-b-0;
|
|
119
118
|
@apply rounded-t-md;
|
|
120
|
-
@apply rounded-b-md;
|
|
121
|
-
overflow: visible;
|
|
122
119
|
}
|
|
123
120
|
|
|
124
121
|
.ag-layout-auto-height {
|
package/src/overlays/Modal.scss
CHANGED
|
@@ -4,15 +4,19 @@
|
|
|
4
4
|
--title-font-size: var(--bloom-font-size-base-alt);
|
|
5
5
|
--title-font-family: var(--bloom-font-sans);
|
|
6
6
|
--content-font-color: var(--bloom-color-gray-700);
|
|
7
|
-
--content-padding-block: var(--bloom-
|
|
7
|
+
--content-padding-block: var(--bloom-s6);
|
|
8
8
|
--max-width: var(--bloom-width-5xl);
|
|
9
9
|
--desktop-min-width: var(--bloom-width-lg);
|
|
10
10
|
--footer-background-color: var(--bloom-color-primary-lighter);
|
|
11
11
|
--border-radius: var(--bloom-rounded);
|
|
12
|
+
--mobile-border-radius: 0;
|
|
12
13
|
--background-color: var(--bloom-color-white);
|
|
13
14
|
--modal-shadow: var(--bloom-shadow-md);
|
|
14
15
|
--modal-border: var(--bloom-border-1) solid var(--bloom-color-gray-400);
|
|
15
16
|
--footer-justify: normal;
|
|
17
|
+
--footer-height: 170px;
|
|
18
|
+
overflow: auto;
|
|
19
|
+
-webkit-overflow-scrolling: touch;
|
|
16
20
|
|
|
17
21
|
position: relative;
|
|
18
22
|
max-width: var(--max-width);
|
|
@@ -20,11 +24,21 @@
|
|
|
20
24
|
margin: auto;
|
|
21
25
|
border: var(--modal-border);
|
|
22
26
|
background-color: var(--background-color);
|
|
23
|
-
border-radius: var(--border-radius);
|
|
24
27
|
box-shadow: var(--modal-shadow);
|
|
28
|
+
width: 100vw;
|
|
29
|
+
border-radius: var(--mobile-border-radius);
|
|
25
30
|
|
|
26
|
-
@media (min-width: $screen-
|
|
31
|
+
@media (min-width: $screen-sm) {
|
|
32
|
+
border-radius: var(--border-radius);
|
|
27
33
|
min-width: var(--desktop-min-width);
|
|
34
|
+
width: auto;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
max-height: 100vh;
|
|
38
|
+
max-width: 100vw;
|
|
39
|
+
@media (min-width: $screen-md) {
|
|
40
|
+
max-height: calc(100vh - var(--bloom-s6));
|
|
41
|
+
max-width: calc(100vw - var(--bloom-s6));
|
|
28
42
|
}
|
|
29
43
|
}
|
|
30
44
|
|
|
@@ -35,6 +49,7 @@
|
|
|
35
49
|
.modal__title {
|
|
36
50
|
padding-block: var(--bloom-s6) var(--bloom-s3);
|
|
37
51
|
padding-inline: var(--bloom-s6) var(--bloom-s12);
|
|
52
|
+
padding-bottom: var(--bloom-s6);
|
|
38
53
|
color: var(--title-color);
|
|
39
54
|
font-size: var(--title-font-size);
|
|
40
55
|
font-family: var(--title-font-family);
|
|
@@ -43,6 +58,7 @@
|
|
|
43
58
|
.modal__inner {
|
|
44
59
|
padding-block: var(--content-padding-block);
|
|
45
60
|
padding-inline: var(--bloom-s6);
|
|
61
|
+
padding-top: 0;
|
|
46
62
|
|
|
47
63
|
&:last-of-type {
|
|
48
64
|
border-bottom-right-radius: var(--border-radius);
|
|
@@ -50,7 +66,13 @@
|
|
|
50
66
|
}
|
|
51
67
|
|
|
52
68
|
&.is-scrollable {
|
|
53
|
-
max-height: calc(100vh -
|
|
69
|
+
max-height: calc(100vh - var(--footer-height));
|
|
70
|
+
max-width: 100vw;
|
|
71
|
+
@media (min-width: $screen-md) {
|
|
72
|
+
max-height: calc(100vh - (var(--footer-height) + var(--bloom-s6)));
|
|
73
|
+
max-width: calc(100vw - var(--bloom-s6));
|
|
74
|
+
margin-bottom: auto;
|
|
75
|
+
}
|
|
54
76
|
overflow-y: auto;
|
|
55
77
|
}
|
|
56
78
|
|
|
@@ -60,14 +82,14 @@
|
|
|
60
82
|
}
|
|
61
83
|
|
|
62
84
|
.modal__footer {
|
|
63
|
-
padding
|
|
64
|
-
padding-inline: var(--bloom-s6);
|
|
85
|
+
padding: var(--bloom-s6);
|
|
65
86
|
border-bottom-right-radius: var(--border-radius);
|
|
66
87
|
border-bottom-left-radius: var(--border-radius);
|
|
67
88
|
background-color: var(--footer-background-color);
|
|
68
89
|
|
|
69
90
|
display: flex;
|
|
70
91
|
flex-direction: row-reverse;
|
|
92
|
+
flex-wrap: wrap;
|
|
71
93
|
gap: var(--bloom-s5);
|
|
72
94
|
justify-content: var(--footer-justify);
|
|
73
95
|
align-items: center;
|
package/src/overlays/Modal.tsx
CHANGED
|
@@ -64,18 +64,6 @@ export const Modal = (props: ModalProps) => {
|
|
|
64
64
|
role={props.role ? props.role : "dialog"}
|
|
65
65
|
>
|
|
66
66
|
<div className={modalClassNames.join(" ")}>
|
|
67
|
-
<ModalHeader
|
|
68
|
-
title={props.title}
|
|
69
|
-
uniqueId={uniqueIdRef.current}
|
|
70
|
-
className={props.headerClassNames}
|
|
71
|
-
/>
|
|
72
|
-
|
|
73
|
-
<section className={innerClassNames.join(" ")}>
|
|
74
|
-
{typeof props.children === "string" ? <p>{props.children}</p> : props.children}
|
|
75
|
-
</section>
|
|
76
|
-
|
|
77
|
-
{props.actions && <ModalFooter actions={props.actions} />}
|
|
78
|
-
|
|
79
67
|
{!props.hideCloseIcon && (
|
|
80
68
|
<button
|
|
81
69
|
className={closeClassNames.join(" ")}
|
|
@@ -90,6 +78,17 @@ export const Modal = (props: ModalProps) => {
|
|
|
90
78
|
/>
|
|
91
79
|
</button>
|
|
92
80
|
)}
|
|
81
|
+
<ModalHeader
|
|
82
|
+
title={props.title}
|
|
83
|
+
uniqueId={uniqueIdRef.current}
|
|
84
|
+
className={props.headerClassNames}
|
|
85
|
+
/>
|
|
86
|
+
|
|
87
|
+
<section className={innerClassNames.join(" ")}>
|
|
88
|
+
{typeof props.children === "string" ? <p>{props.children}</p> : props.children}
|
|
89
|
+
</section>
|
|
90
|
+
|
|
91
|
+
{props.actions && <ModalFooter actions={props.actions} />}
|
|
93
92
|
</div>
|
|
94
93
|
</Overlay>
|
|
95
94
|
)
|
package/src/overlays/Overlay.tsx
CHANGED
|
@@ -3,7 +3,7 @@ import "./Overlay.scss"
|
|
|
3
3
|
import useKeyPress from "../helpers/useKeyPress"
|
|
4
4
|
import { createPortal } from "react-dom"
|
|
5
5
|
import FocusLock from "react-focus-lock"
|
|
6
|
-
import {
|
|
6
|
+
import { RemoveScroll } from "react-remove-scroll"
|
|
7
7
|
import { CSSTransition } from "react-transition-group"
|
|
8
8
|
|
|
9
9
|
export type OverlayProps = {
|
|
@@ -70,18 +70,6 @@ export const Overlay = (props: OverlayProps) => {
|
|
|
70
70
|
}
|
|
71
71
|
}, [elForPortal, overlayRoot])
|
|
72
72
|
|
|
73
|
-
// disable body scrolling when the overlay is open
|
|
74
|
-
useEffect(() => {
|
|
75
|
-
if (props.scrollable) return
|
|
76
|
-
if (!(overlayRoot && elForPortal)) return
|
|
77
|
-
|
|
78
|
-
props.open ? disableBodyScroll(elForPortal) : enableBodyScroll(elForPortal)
|
|
79
|
-
|
|
80
|
-
return () => {
|
|
81
|
-
enableBodyScroll(elForPortal)
|
|
82
|
-
}
|
|
83
|
-
}, [elForPortal, overlayRoot, props.open])
|
|
84
|
-
|
|
85
73
|
return (
|
|
86
74
|
elForPortal &&
|
|
87
75
|
createPortal(
|
|
@@ -92,7 +80,9 @@ export const Overlay = (props: OverlayProps) => {
|
|
|
92
80
|
mountOnEnter
|
|
93
81
|
unmountOnExit
|
|
94
82
|
>
|
|
95
|
-
<
|
|
83
|
+
<RemoveScroll>
|
|
84
|
+
<OverlayInner {...props}>{props.children}</OverlayInner>
|
|
85
|
+
</RemoveScroll>
|
|
96
86
|
</CSSTransition>,
|
|
97
87
|
elForPortal
|
|
98
88
|
)
|
|
@@ -6,6 +6,7 @@ import {
|
|
|
6
6
|
Form,
|
|
7
7
|
Field,
|
|
8
8
|
emailRegex,
|
|
9
|
+
AppearanceSizeType,
|
|
9
10
|
} from "@bloom-housing/ui-components"
|
|
10
11
|
import React, { useEffect, useMemo } from "react"
|
|
11
12
|
import { useForm } from "react-hook-form"
|
|
@@ -67,6 +68,7 @@ const ResendConfirmationModal = ({
|
|
|
67
68
|
styleType={AppearanceStyleType.primary}
|
|
68
69
|
onClick={() => onFormSubmit()}
|
|
69
70
|
loading={loading}
|
|
71
|
+
size={AppearanceSizeType.small}
|
|
70
72
|
>
|
|
71
73
|
{t("authentication.createAccount.resendTheEmail")}
|
|
72
74
|
</Button>,
|
|
@@ -77,6 +79,7 @@ const ResendConfirmationModal = ({
|
|
|
77
79
|
onClose()
|
|
78
80
|
window.scrollTo(0, 0)
|
|
79
81
|
}}
|
|
82
|
+
size={AppearanceSizeType.small}
|
|
80
83
|
>
|
|
81
84
|
{t("t.cancel")}
|
|
82
85
|
</Button>,
|
package/src/tables/AgTable.tsx
CHANGED
|
@@ -207,8 +207,12 @@ const AgTable = ({
|
|
|
207
207
|
|
|
208
208
|
return (
|
|
209
209
|
<div className={`ag-theme-alpine ag-theme-bloom ${className || ""}`}>
|
|
210
|
-
<div
|
|
211
|
-
|
|
210
|
+
<div
|
|
211
|
+
className={`flex justify-between flex-col md:flex-row ${
|
|
212
|
+
showSearch || headerContent ? "mb-4" : ""
|
|
213
|
+
}`}
|
|
214
|
+
>
|
|
215
|
+
<div className={`flex flex-wrap ${!showSearch && "hidden"}`}>
|
|
212
216
|
<div className="md:mr-5 w-full md:w-56">
|
|
213
217
|
<Field
|
|
214
218
|
dataTestId="ag-search-input"
|
|
@@ -227,7 +231,6 @@ const AgTable = ({
|
|
|
227
231
|
)}
|
|
228
232
|
</div>
|
|
229
233
|
</div>
|
|
230
|
-
|
|
231
234
|
{headerContent}
|
|
232
235
|
</div>
|
|
233
236
|
<div className="applications-table">
|
package/tailwind.config.js
CHANGED
|
@@ -18,6 +18,7 @@ module.exports = {
|
|
|
18
18
|
sm: "var(--bloom-font-size-sm)",
|
|
19
19
|
tiny: "var(--bloom-font-size-tiny)",
|
|
20
20
|
base: "var(--bloom-font-size-base)",
|
|
21
|
+
"base-alt": "var(--bloom-font-size-base-alt)",
|
|
21
22
|
lg: "var(--bloom-font-size-lg)",
|
|
22
23
|
xl: "var(--bloom-font-size-xl)",
|
|
23
24
|
"2xl": "var(--bloom-font-size-2xl)",
|