@bloom-housing/ui-components 5.1.1-alpha.19 → 5.1.1-alpha.21
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 +16 -0
- package/package.json +2 -2
- package/src/blocks/HousingCounselor.tsx +8 -3
- package/src/blocks/ImageCard.tsx +9 -2
- package/src/blocks/StatusItem.tsx +17 -6
- package/src/forms/DOBField.tsx +16 -7
- package/src/forms/DateField.tsx +16 -7
- package/src/forms/Dropzone.tsx +12 -3
- package/src/forms/FieldGroup.tsx +13 -2
- package/src/forms/HouseholdMemberForm.tsx +4 -1
- package/src/forms/HouseholdSizeField.tsx +15 -5
- package/src/forms/TimeField.tsx +15 -6
- package/src/headers/Hero.tsx +8 -1
- package/src/headers/SiteHeader.tsx +11 -4
- package/src/helpers/formOptions.tsx +4 -1
- package/src/helpers/formatYesNoLabel.ts +8 -6
- package/src/navigation/ProgressNav.tsx +21 -3
- package/src/notifications/AlertBox.docs.mdx +41 -0
- package/src/notifications/AlertBox.scss +63 -41
- package/src/notifications/AlertBox.tsx +13 -9
- package/src/notifications/StatusMessage.tsx +8 -2
- package/src/notifications/alertTypes.ts +1 -0
- package/src/page_components/ApplicationTimeline.tsx +14 -4
- 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/tables/AgTable.tsx +10 -3
- package/src/tables/StandardTable.tsx +13 -5
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React, { useState, useEffect } from "react"
|
|
2
2
|
import { DragDropContext, Droppable, Draggable, DropResult } from "react-beautiful-dnd"
|
|
3
3
|
import { nanoid } from "nanoid"
|
|
4
|
+
import { faGripLines } from "@fortawesome/free-solid-svg-icons"
|
|
4
5
|
import { getTranslationWithArguments } from "../helpers/getTranslationWithArguments"
|
|
5
6
|
import { Icon, IconFillColors } from "../icons/Icon"
|
|
6
7
|
import { t } from "../helpers/translator"
|
|
7
|
-
import { faGripLines } from "@fortawesome/free-solid-svg-icons"
|
|
8
8
|
|
|
9
9
|
export interface TableHeadersOptions {
|
|
10
10
|
name: string
|
|
@@ -74,6 +74,10 @@ export interface StandardTableProps {
|
|
|
74
74
|
translateData?: boolean
|
|
75
75
|
/** An id applied to the table */
|
|
76
76
|
id?: string
|
|
77
|
+
strings?: {
|
|
78
|
+
orderString?: string
|
|
79
|
+
sortString?: string
|
|
80
|
+
}
|
|
77
81
|
}
|
|
78
82
|
|
|
79
83
|
const headerName = (header: string | TableHeadersOptions) => {
|
|
@@ -110,12 +114,16 @@ export const StandardTable = (props: StandardTableProps) => {
|
|
|
110
114
|
}, [props.data])
|
|
111
115
|
|
|
112
116
|
if (props.draggable) {
|
|
113
|
-
headerLabels.splice(
|
|
117
|
+
headerLabels.splice(
|
|
118
|
+
0,
|
|
119
|
+
0,
|
|
120
|
+
<th key={"header-draggable"}>{props.strings?.orderString ?? t("t.order")}</th>
|
|
121
|
+
)
|
|
114
122
|
headerLabels.splice(
|
|
115
123
|
0,
|
|
116
124
|
0,
|
|
117
125
|
<th key={"header-draggable"} className={"table__draggable-cell pl-5"}>
|
|
118
|
-
{t("t.sort")}
|
|
126
|
+
{props.strings?.sortString ?? t("t.sort")}
|
|
119
127
|
</th>
|
|
120
128
|
)
|
|
121
129
|
}
|
|
@@ -156,7 +164,7 @@ export const StandardTable = (props: StandardTableProps) => {
|
|
|
156
164
|
0,
|
|
157
165
|
<Cell
|
|
158
166
|
key={`${dataIndex}-order-draggable`}
|
|
159
|
-
headerLabel={t("t.sort")}
|
|
167
|
+
headerLabel={props.strings?.sortString ?? t("t.sort")}
|
|
160
168
|
className={`pl-5 ${cellClassName ?? undefined}`}
|
|
161
169
|
>
|
|
162
170
|
{dataIndex + 1}
|
|
@@ -167,7 +175,7 @@ export const StandardTable = (props: StandardTableProps) => {
|
|
|
167
175
|
0,
|
|
168
176
|
<Cell
|
|
169
177
|
key={`${dataIndex}-sort-draggable`}
|
|
170
|
-
headerLabel={t("t.sort")}
|
|
178
|
+
headerLabel={props.strings?.sortString ?? t("t.sort")}
|
|
171
179
|
className={`table__draggable-cell pl-7`}
|
|
172
180
|
>
|
|
173
181
|
<Icon symbol={faGripLines} size={"medium"} fill={IconFillColors.primary} />
|