@bloom-housing/ui-components 4.0.1-alpha.16 → 4.0.1-alpha.17
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
|
+
## [4.0.1-alpha.17](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.0.1-alpha.16...@bloom-housing/ui-components@4.0.1-alpha.17) (2022-01-07)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* listings group expandable section css updates ([#2377](https://github.com/bloom-housing/bloom/issues/2377)) ([fba77ef](https://github.com/bloom-housing/bloom/commit/fba77efc25ccb213a0e18a8b58ddf8ada07fbb8c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [4.0.1-alpha.16](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.0.1-alpha.15...@bloom-housing/ui-components@4.0.1-alpha.16) (2022-01-07)
|
|
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": "4.0.1-alpha.
|
|
3
|
+
"version": "4.0.1-alpha.17",
|
|
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",
|
|
@@ -100,5 +100,5 @@
|
|
|
100
100
|
"tailwindcss": "2.2.10",
|
|
101
101
|
"typesafe-actions": "^5.1.0"
|
|
102
102
|
},
|
|
103
|
-
"gitHead": "
|
|
103
|
+
"gitHead": "b08adf48ec1e961f78e5d7111201c0781f5c96ca"
|
|
104
104
|
}
|
package/src/icons/Icon.tsx
CHANGED
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
CloseRound,
|
|
18
18
|
CloseSmall,
|
|
19
19
|
Cross,
|
|
20
|
+
DoubleHouse,
|
|
20
21
|
Down,
|
|
21
22
|
Download,
|
|
22
23
|
Draggable,
|
|
@@ -75,6 +76,7 @@ const IconMap = {
|
|
|
75
76
|
closeRound: CloseRound,
|
|
76
77
|
closeSmall: CloseSmall,
|
|
77
78
|
cross: Cross,
|
|
79
|
+
doubleHouse: DoubleHouse,
|
|
78
80
|
down: Down,
|
|
79
81
|
download: Download,
|
|
80
82
|
draggable: Draggable,
|
package/src/icons/Icons.tsx
CHANGED
|
@@ -243,6 +243,20 @@ export const Cross = (props: IconProps) => {
|
|
|
243
243
|
)
|
|
244
244
|
}
|
|
245
245
|
|
|
246
|
+
export const DoubleHouse = (props: IconProps) => {
|
|
247
|
+
return (
|
|
248
|
+
<svg viewBox="0 0 32 32" fill={props.fill ?? "currentColor"}>
|
|
249
|
+
<path d="M8.68 24.053c0.173 0 0.347-0.080 0.48-0.213 0.12-0.12 0.187-0.28 0.187-0.467 0-0.16-0.067-0.333-0.187-0.469-0.253-0.251-0.707-0.24-0.947 0-0.12 0.122-0.2 0.294-0.2 0.469 0 0.187 0.080 0.347 0.2 0.478 0.12 0.122 0.293 0.202 0.467 0.202z"></path>
|
|
250
|
+
<path d="M18.019 22.714h1.384c0.368 0 0.667-0.299 0.667-0.667s-0.299-0.667-0.667-0.667h-1.384c-0.368 0-0.667 0.299-0.667 0.667s0.298 0.667 0.667 0.667z"></path>
|
|
251
|
+
<path d="M18.019 18.714h1.384c0.368 0 0.667-0.299 0.667-0.667s-0.299-0.667-0.667-0.667h-1.384c-0.368 0-0.667 0.299-0.667 0.667s0.298 0.667 0.667 0.667z"></path>
|
|
252
|
+
<path d="M23.354 22.714h1.333c0.368 0 0.667-0.299 0.667-0.667s-0.299-0.667-0.667-0.667h-1.333c-0.368 0-0.667 0.299-0.667 0.667s0.298 0.667 0.667 0.667z"></path>
|
|
253
|
+
<path d="M23.354 26.715h1.333c0.368 0 0.667-0.299 0.667-0.667s-0.299-0.667-0.667-0.667h-1.333c-0.368 0-0.667 0.299-0.667 0.667s0.298 0.667 0.667 0.667z"></path>
|
|
254
|
+
<path d="M23.354 18.714h1.333c0.368 0 0.667-0.299 0.667-0.667s-0.299-0.667-0.667-0.667h-1.333c-0.368 0-0.667 0.299-0.667 0.667s0.298 0.667 0.667 0.667z"></path>
|
|
255
|
+
<path d="M31.51 15.406l-19.499-7.253c-0.342-0.128-0.728 0.046-0.858 0.392s0.048 0.73 0.394 0.858l1.805 0.672v6.784l-10.166 2.629c0 0 0 0-0.002 0l-2.618 0.675c-0.357 0.091-0.571 0.456-0.478 0.813 0.077 0.301 0.347 0.501 0.643 0.501 0.056 0 0.11-0.006 0.166-0.021l1.784-0.461v10.387c0 0.368 0.299 0.667 0.667 0.667h25.333c0.368 0 0.667-0.299 0.667-0.667v-15.354l1.693 0.629c0.077 0.027 0.157 0.042 0.234 0.042 0.27 0 0.525-0.166 0.626-0.435 0.128-0.344-0.045-0.728-0.39-0.856zM4.019 20.65l9.333-2.414v12.478h-1.333v-4.667c0-0.368-0.299-0.667-0.667-0.667h-5.333c-0.368 0-0.667 0.299-0.667 0.667v4.667h-1.333v-10.064zM6.685 30.715v-4h4v4h-4zM18.686 30.715v-4h1.333v4h-1.333zM28.019 30.715h-6.667v-4.667c0-0.368-0.299-0.667-0.667-0.667h-2.667c-0.368 0-0.667 0.299-0.667 0.667v4.667h-2.667v-20.144l13.333 4.962v15.182z"></path>
|
|
256
|
+
</svg>
|
|
257
|
+
)
|
|
258
|
+
}
|
|
259
|
+
|
|
246
260
|
export const Down = (props: IconProps) => {
|
|
247
261
|
return (
|
|
248
262
|
<svg viewBox={"0 0 32 32"} fill={props.fill ?? "currentColor"}>
|
|
@@ -6,44 +6,71 @@
|
|
|
6
6
|
|
|
7
7
|
.listings-group__header {
|
|
8
8
|
@apply flex;
|
|
9
|
-
@apply flex-
|
|
10
|
-
@apply flex-wrap;
|
|
9
|
+
@apply flex-col;
|
|
11
10
|
@apply max-w-5xl;
|
|
12
11
|
@apply m-auto;
|
|
13
12
|
@apply mt-6;
|
|
14
13
|
@apply mb-8;
|
|
15
14
|
@apply p-3;
|
|
15
|
+
@apply justify-between;
|
|
16
|
+
|
|
17
|
+
@screen md {
|
|
18
|
+
@apply flex-row;
|
|
19
|
+
}
|
|
16
20
|
}
|
|
17
21
|
|
|
18
22
|
.listings-group__icon {
|
|
19
23
|
@apply hidden;
|
|
20
|
-
@apply pt-2;
|
|
21
24
|
@apply pr-5;
|
|
25
|
+
@apply mr-5;
|
|
26
|
+
@apply border-r-4;
|
|
27
|
+
@apply border-gray-700;
|
|
28
|
+
@apply items-center;
|
|
29
|
+
@apply hidden;
|
|
30
|
+
@screen md {
|
|
31
|
+
@apply flex;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.listings-group__content {
|
|
36
|
+
@apply flex;
|
|
37
|
+
@apply flex-row;
|
|
38
|
+
flex-grow: 2;
|
|
39
|
+
margin-right: 15px;
|
|
22
40
|
|
|
41
|
+
@apply max-w-full;
|
|
23
42
|
@screen md {
|
|
24
|
-
|
|
43
|
+
max-width: 70%;
|
|
25
44
|
}
|
|
26
45
|
}
|
|
27
46
|
|
|
28
47
|
.listings-group__header-group {
|
|
29
|
-
|
|
48
|
+
max-width: inherit;
|
|
30
49
|
@apply flex;
|
|
31
|
-
@apply
|
|
32
|
-
@apply
|
|
50
|
+
@apply flex-col;
|
|
51
|
+
@apply items-start;
|
|
52
|
+
@apply justify-center;
|
|
53
|
+
@apply h-full;
|
|
54
|
+
}
|
|
33
55
|
|
|
56
|
+
.listings-group__info {
|
|
57
|
+
@apply text-gray-750;
|
|
58
|
+
@apply pt-1;
|
|
59
|
+
@apply pt-2;
|
|
34
60
|
@screen md {
|
|
35
|
-
@apply
|
|
36
|
-
@apply mb-0;
|
|
61
|
+
@apply pt-0;
|
|
37
62
|
}
|
|
38
63
|
}
|
|
39
64
|
|
|
40
65
|
.listings-group__button {
|
|
41
|
-
@apply w-full;
|
|
42
66
|
@apply flex;
|
|
43
67
|
@apply items-center;
|
|
44
|
-
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
@apply ml-0;
|
|
70
|
+
@apply pt-5;
|
|
45
71
|
@screen md {
|
|
46
|
-
@apply
|
|
72
|
+
@apply ml-6;
|
|
73
|
+
@apply pt-0;
|
|
47
74
|
}
|
|
48
75
|
}
|
|
49
76
|
|
|
@@ -51,15 +78,13 @@
|
|
|
51
78
|
@apply uppercase;
|
|
52
79
|
@apply font-alt-sans;
|
|
53
80
|
@apply font-black;
|
|
54
|
-
@apply my-1;
|
|
55
81
|
@apply tracking-widest;
|
|
56
82
|
@apply border-b-4;
|
|
57
|
-
@apply border-gray-
|
|
83
|
+
@apply border-gray-700;
|
|
58
84
|
@apply pb-1;
|
|
59
85
|
|
|
60
86
|
@screen md {
|
|
61
|
-
@apply
|
|
62
|
-
@apply border-
|
|
63
|
-
@apply border-l-4;
|
|
87
|
+
@apply pb-0;
|
|
88
|
+
@apply border-0;
|
|
64
89
|
}
|
|
65
90
|
}
|
|
@@ -1,43 +1,41 @@
|
|
|
1
1
|
import React, { useState } from "react"
|
|
2
2
|
import { Button } from "../../actions/Button"
|
|
3
|
-
import { Icon } from "../../icons/Icon"
|
|
3
|
+
import { Icon, IconTypes } from "../../icons/Icon"
|
|
4
4
|
import "./ListingsGroup.scss"
|
|
5
5
|
|
|
6
6
|
export interface ListingsGroupProps {
|
|
7
7
|
children?: React.ReactNode
|
|
8
|
-
listingsCount: number
|
|
9
8
|
header: string
|
|
9
|
+
hideButtonText: string
|
|
10
|
+
icon?: IconTypes
|
|
10
11
|
info?: string
|
|
12
|
+
listingsCount: number
|
|
11
13
|
showButtonText: string
|
|
12
|
-
hideButtonText: string
|
|
13
14
|
}
|
|
14
15
|
|
|
15
16
|
const ListingsGroup = (props: ListingsGroupProps) => {
|
|
16
17
|
const [showListings, setShowListings] = useState(false)
|
|
17
18
|
const toggleListings = () => setShowListings(!showListings)
|
|
18
19
|
|
|
19
|
-
let buttonText
|
|
20
|
-
|
|
21
20
|
const listingsCount = ` (${props.listingsCount})`
|
|
22
|
-
if (showListings) {
|
|
23
|
-
buttonText = props.hideButtonText + listingsCount
|
|
24
|
-
} else {
|
|
25
|
-
buttonText = props.showButtonText + listingsCount
|
|
26
|
-
}
|
|
27
21
|
|
|
28
22
|
return (
|
|
29
23
|
<div className="listings-group">
|
|
30
24
|
<div className="listings-group__header">
|
|
31
|
-
<div className="listings-
|
|
32
|
-
<
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
<
|
|
36
|
-
|
|
25
|
+
<div className={"listings-group__content"}>
|
|
26
|
+
<div className="listings-group__icon">
|
|
27
|
+
<Icon size="xlarge" symbol={props.icon ?? `clock`} />
|
|
28
|
+
</div>
|
|
29
|
+
<div className="listings-group__header-group">
|
|
30
|
+
<h2 className="listings-group__title">{props.header}</h2>
|
|
31
|
+
{props.info && <div className="listings-group__info">{props.info}</div>}
|
|
32
|
+
</div>
|
|
37
33
|
</div>
|
|
38
34
|
<div className="listings-group__button">
|
|
39
35
|
<Button className="w-full" onClick={() => toggleListings()}>
|
|
40
|
-
{
|
|
36
|
+
{showListings
|
|
37
|
+
? props.hideButtonText + listingsCount
|
|
38
|
+
: props.showButtonText + listingsCount}
|
|
41
39
|
</Button>
|
|
42
40
|
</div>
|
|
43
41
|
</div>
|