@bloom-housing/ui-components 4.0.1-alpha.16 → 4.0.1-alpha.20

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,47 @@
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.20](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.0.1-alpha.19...@bloom-housing/ui-components@4.0.1-alpha.20) (2022-01-13)
7
+
8
+ **Note:** Version bump only for package @bloom-housing/ui-components
9
+
10
+
11
+
12
+
13
+
14
+ ## [4.0.1-alpha.19](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.0.1-alpha.18...@bloom-housing/ui-components@4.0.1-alpha.19) (2022-01-11)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * use drag n drop ([a354904](https://github.com/bloom-housing/bloom/commit/a3549045d4f0da64692318f84f0336f1287ad48a))
20
+
21
+
22
+
23
+
24
+
25
+ ## [4.0.1-alpha.18](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@4.0.1-alpha.17...@bloom-housing/ui-components@4.0.1-alpha.18) (2022-01-08)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * ensure dayjs parsing strings will work as expected ([eb44939](https://github.com/bloom-housing/bloom/commit/eb449395ebea3a3b4b58eb217df1e1313c722a0d))
31
+
32
+
33
+
34
+
35
+
36
+ ## [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)
37
+
38
+
39
+ ### Bug Fixes
40
+
41
+ * listings group expandable section css updates ([#2377](https://github.com/bloom-housing/bloom/issues/2377)) ([fba77ef](https://github.com/bloom-housing/bloom/commit/fba77efc25ccb213a0e18a8b58ddf8ada07fbb8c))
42
+
43
+
44
+
45
+
46
+
6
47
  ## [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
48
 
8
49
  **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.16",
3
+ "version": "4.0.1-alpha.20",
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": "3d25f7fd5ae02d802042996bad55655cd5fe730f"
103
+ "gitHead": "4c8409db235ba764d41a83cd63462413a5b14926"
104
104
  }
@@ -2,6 +2,8 @@ import React from "react"
2
2
  import { t } from "../helpers/translator"
3
3
  import { Field } from "./Field"
4
4
  import dayjs from "dayjs"
5
+ import customParseFormat from "dayjs/plugin/customParseFormat"
6
+ dayjs.extend(customParseFormat)
5
7
  import { UseFormMethods, FieldError, DeepMap } from "react-hook-form"
6
8
 
7
9
  export type DOBFieldValues = {
@@ -49,7 +49,7 @@ const Dropzone = (props: DropzoneProps) => {
49
49
  <progress className="dropzone__progress" max="100" value={props.progress}></progress>
50
50
  ) : (
51
51
  <div className={dropzoneClasses.join(" ")} {...getRootProps()}>
52
- <input id={props.id} {...getInputProps()} />
52
+ <input id={props.id} {...getInputProps()} data-test-id={"dropzone-input"} />
53
53
  {isDragActive ? (
54
54
  <p>{t("t.dropFilesHere")}</p>
55
55
  ) : (
@@ -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,
@@ -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"}>
@@ -639,6 +639,20 @@
639
639
  "address": "Address",
640
640
  "name": "Name",
641
641
  "organization": "Name of Organization"
642
+ },
643
+ "rosefieldLive": {
644
+ "title": "Previous Residents of Rosefield Village Relocated Outside of the City of Alameda",
645
+ "yes": {
646
+ "label": "At least one member of my household was a previous resident of Rosefield Village",
647
+ "description": "At least one member of my household was a previous resident of Rosefield Village"
648
+ }
649
+ },
650
+ "rosefieldAUSD": {
651
+ "title": "Alameda Unified School District (AUSD) employee",
652
+ "yes": {
653
+ "label": "At least one member of my household is an Alameda Unified School District employee",
654
+ "description": "At least one member of my household is an Alameda Unified School District employee."
655
+ }
642
656
  }
643
657
  },
644
658
  "review": {
@@ -945,7 +959,7 @@
945
959
  "es": "Español",
946
960
  "zh": "中文",
947
961
  "vi": "Tiếng Việt",
948
- "tl": "Tagalog"
962
+ "tl": "Filipino"
949
963
  },
950
964
  "leasingAgent": {
951
965
  "contact": "Contact Leasing Agent",
@@ -6,44 +6,71 @@
6
6
 
7
7
  .listings-group__header {
8
8
  @apply flex;
9
- @apply flex-row;
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
- @apply inline-block;
43
+ max-width: 70%;
25
44
  }
26
45
  }
27
46
 
28
47
  .listings-group__header-group {
29
- @apply w-full;
48
+ max-width: inherit;
30
49
  @apply flex;
31
- @apply items-center;
32
- @apply mb-4;
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 w-7/12;
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 w-4/12;
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-600;
83
+ @apply border-gray-700;
58
84
  @apply pb-1;
59
85
 
60
86
  @screen md {
61
- @apply px-4;
62
- @apply border-b-0;
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-group__icon">
32
- <Icon size="xlarge" symbol="clock" />
33
- </div>
34
- <div className="listings-group__header-group">
35
- <h2 className="listings-group__title">{props.header}</h2>
36
- {props.info && <div className="px-4 my-2">{props.info}</div>}
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
- {buttonText}
36
+ {showListings
37
+ ? props.hideButtonText + listingsCount
38
+ : props.showButtonText + listingsCount}
41
39
  </Button>
42
40
  </div>
43
41
  </div>