@bloom-housing/ui-components 5.1.1-alpha.24 → 5.1.1-alpha.25
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
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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
|
+
## [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)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Features
|
|
10
|
+
|
|
11
|
+
* 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))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [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)
|
|
7
18
|
|
|
8
19
|
**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": "5.1.1-alpha.
|
|
3
|
+
"version": "5.1.1-alpha.25",
|
|
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",
|
|
@@ -110,5 +110,5 @@
|
|
|
110
110
|
"ts-jest": "^26.4.1",
|
|
111
111
|
"typesafe-actions": "^5.1.0"
|
|
112
112
|
},
|
|
113
|
-
"gitHead": "
|
|
113
|
+
"gitHead": "102d800f5cefa5d6e2f49108b87e8d704a9b5f1e"
|
|
114
114
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
.page-header {
|
|
2
2
|
/* Component Variables */
|
|
3
|
-
--background-color: var(--bloom-color-
|
|
3
|
+
--background-color: var(--bloom-color-gray-300);
|
|
4
4
|
--border-color: var(--bloom-color-gray-450);
|
|
5
5
|
--text-color: inherit;
|
|
6
6
|
--text-font-family: var(--bloom-font-serif);
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
.alert-box__close {
|
|
98
98
|
font-size: var(--bloom-font-size-3xl);
|
|
99
99
|
right: var(--horizontal-padding);
|
|
100
|
-
margin-left: var(--
|
|
100
|
+
margin-left: var(--bloom-s3);
|
|
101
101
|
padding: 0;
|
|
102
102
|
line-height: var(--bloom-s4);
|
|
103
103
|
color: var(--close-icon-color);
|
|
@@ -106,3 +106,18 @@
|
|
|
106
106
|
.alert-box__icon {
|
|
107
107
|
margin-right: var(--bloom-s3);
|
|
108
108
|
}
|
|
109
|
+
|
|
110
|
+
.alert-box__sticky {
|
|
111
|
+
position: sticky;
|
|
112
|
+
top: var(--bloom-s3);
|
|
113
|
+
margin-top: var(--bloom-s3);
|
|
114
|
+
margin-right: var(--bloom-s3);
|
|
115
|
+
z-index: 10;
|
|
116
|
+
margin-left: auto;
|
|
117
|
+
width: fit-content;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.alert-box__sticky + * {
|
|
121
|
+
--alert-box-height: -3.6rem;
|
|
122
|
+
margin-top: var(--alert-box-height);
|
|
123
|
+
}
|
|
@@ -6,15 +6,16 @@ import { colorClasses } from "./alertTypes"
|
|
|
6
6
|
import "./AlertBox.scss"
|
|
7
7
|
|
|
8
8
|
export interface AlertBoxProps {
|
|
9
|
-
|
|
10
|
-
customIcon?: IconTypes
|
|
11
|
-
closeable?: boolean
|
|
12
|
-
onClose?: () => void
|
|
9
|
+
boundToLayoutWidth?: boolean
|
|
13
10
|
children: ReactNode
|
|
14
|
-
inverted?: boolean
|
|
15
11
|
className?: string
|
|
16
|
-
|
|
12
|
+
closeable?: boolean
|
|
13
|
+
customIcon?: IconTypes
|
|
14
|
+
inverted?: boolean
|
|
17
15
|
narrow?: boolean
|
|
16
|
+
onClose?: () => void
|
|
17
|
+
sticky?: boolean
|
|
18
|
+
type?: AlertTypes
|
|
18
19
|
}
|
|
19
20
|
|
|
20
21
|
const icons: { [k in AlertTypes]: IconTypes } = {
|
|
@@ -35,6 +36,7 @@ const AlertBox = (props: AlertBoxProps) => {
|
|
|
35
36
|
...(props.className ? [props.className] : []),
|
|
36
37
|
...(props.boundToLayoutWidth ? [] : ["fullWidth"]),
|
|
37
38
|
...(props.narrow ? ["narrow"] : []),
|
|
39
|
+
...(props.sticky ? ["alert-box__sticky"] : []),
|
|
38
40
|
].join(" ")
|
|
39
41
|
|
|
40
42
|
if (onClose) closeable = true
|
|
@@ -11,6 +11,7 @@ type SiteAlertProps = {
|
|
|
11
11
|
type: AlertTypes
|
|
12
12
|
message: string
|
|
13
13
|
}
|
|
14
|
+
sticky?: boolean
|
|
14
15
|
}
|
|
15
16
|
|
|
16
17
|
export const setSiteAlertMessage = (message: string, type: AlertTypes) => {
|
|
@@ -30,6 +31,7 @@ export const SiteAlert = ({
|
|
|
30
31
|
type = "alert",
|
|
31
32
|
className,
|
|
32
33
|
alertMessage,
|
|
34
|
+
sticky,
|
|
33
35
|
}: SiteAlertProps) => {
|
|
34
36
|
const [open, setOpen] = useState(false)
|
|
35
37
|
const [message, setMessage] = useState("")
|
|
@@ -75,6 +77,7 @@ export const SiteAlert = ({
|
|
|
75
77
|
onClose={dismissable ? () => setOpen(false) : undefined}
|
|
76
78
|
className={className}
|
|
77
79
|
type={alertMessage?.type ?? type}
|
|
80
|
+
sticky={sticky}
|
|
78
81
|
>
|
|
79
82
|
{message}
|
|
80
83
|
</AlertBox>
|
|
@@ -117,12 +117,12 @@ export const StandardTable = (props: StandardTableProps) => {
|
|
|
117
117
|
headerLabels.splice(
|
|
118
118
|
0,
|
|
119
119
|
0,
|
|
120
|
-
<th key={"header-draggable"}>{props.strings?.orderString ?? t("t.order")}</th>
|
|
120
|
+
<th key={"header-draggable-order"}>{props.strings?.orderString ?? t("t.order")}</th>
|
|
121
121
|
)
|
|
122
122
|
headerLabels.splice(
|
|
123
123
|
0,
|
|
124
124
|
0,
|
|
125
|
-
<th key={"header-draggable"} className={"table__draggable-cell pl-5"}>
|
|
125
|
+
<th key={"header-draggable-sort"} className={"table__draggable-cell pl-5"}>
|
|
126
126
|
{props.strings?.sortString ?? t("t.sort")}
|
|
127
127
|
</th>
|
|
128
128
|
)
|