@bloom-housing/ui-components 6.0.0 → 6.0.1-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.
Files changed (79) hide show
  1. package/CHANGELOG.md +236 -7
  2. package/index.ts +1 -0
  3. package/package.json +3 -5
  4. package/src/actions/Button.tsx +1 -0
  5. package/src/actions/LinkButton.tsx +1 -0
  6. package/src/blocks/FormCard.scss +1 -0
  7. package/src/blocks/HousingCounselor.tsx +8 -3
  8. package/src/blocks/ImageCard.tsx +24 -13
  9. package/src/blocks/MediaCard.docs.mdx +37 -0
  10. package/src/blocks/MediaCard.scss +10 -11
  11. package/src/blocks/MediaCard.tsx +4 -4
  12. package/src/blocks/StandardCard.tsx +1 -1
  13. package/src/blocks/StatusItem.tsx +17 -6
  14. package/src/forms/DOBField.tsx +20 -8
  15. package/src/forms/DateField.tsx +16 -7
  16. package/src/forms/Dropzone.scss +7 -0
  17. package/src/forms/Dropzone.tsx +18 -5
  18. package/src/forms/Field.tsx +5 -0
  19. package/src/forms/FieldGroup.tsx +14 -3
  20. package/src/forms/HouseholdMemberForm.tsx +4 -1
  21. package/src/forms/HouseholdSizeField.tsx +16 -6
  22. package/src/forms/TimeField.tsx +15 -6
  23. package/src/global/custom_counter.scss +1 -1
  24. package/src/global/forms.scss +38 -5
  25. package/src/global/headers.scss +1 -1
  26. package/src/global/markdown.scss +2 -2
  27. package/src/global/vendor/ag_grid.scss +43 -9
  28. package/src/headers/Hero.tsx +8 -1
  29. package/src/headers/PageHeader.scss +3 -2
  30. package/src/headers/PageHeader.tsx +5 -1
  31. package/src/headers/SiteHeader.tsx +11 -4
  32. package/src/helpers/formOptions.tsx +4 -1
  33. package/src/helpers/formatYesNoLabel.ts +8 -6
  34. package/src/locales/es.json +1 -1
  35. package/src/locales/general.json +9 -4
  36. package/src/locales/tl.json +1 -1
  37. package/src/locales/vi.json +1 -1
  38. package/src/locales/zh.json +1 -1
  39. package/src/navigation/Breadcrumbs.scss +1 -0
  40. package/src/navigation/Breadcrumbs.tsx +1 -1
  41. package/src/navigation/FooterNav.tsx +5 -1
  42. package/src/navigation/LanguageNav.tsx +1 -1
  43. package/src/navigation/ProgressNav.docs.mdx +47 -0
  44. package/src/navigation/ProgressNav.scss +101 -56
  45. package/src/navigation/ProgressNav.tsx +45 -15
  46. package/src/navigation/SideNav.scss +56 -0
  47. package/src/navigation/SideNav.tsx +2 -2
  48. package/src/navigation/TabNav.scss +1 -1
  49. package/src/navigation/TabNav.tsx +1 -1
  50. package/src/navigation/Tabs.scss +25 -6
  51. package/src/notifications/AlertBox.docs.mdx +41 -0
  52. package/src/notifications/AlertBox.scss +78 -41
  53. package/src/notifications/AlertBox.tsx +20 -14
  54. package/src/notifications/SiteAlert.tsx +3 -0
  55. package/src/notifications/StatusMessage.tsx +8 -2
  56. package/src/notifications/alertTypes.ts +1 -0
  57. package/src/overlays/Modal.scss +3 -1
  58. package/src/page_components/ApplicationTimeline.scss +6 -6
  59. package/src/page_components/ApplicationTimeline.tsx +17 -7
  60. package/src/page_components/NavigationHeader.tsx +10 -10
  61. package/src/page_components/forgot-password/FormForgotPassword.tsx +1 -1
  62. package/src/page_components/listing/AdditionalFees.tsx +1 -1
  63. package/src/page_components/listing/ListingCard.scss +4 -0
  64. package/src/page_components/listing/ListingCard.tsx +18 -3
  65. package/src/page_components/listing/listing_sidebar/Contact.tsx +2 -2
  66. package/src/page_components/listing/listing_sidebar/GetApplication.tsx +31 -16
  67. package/src/page_components/listing/listing_sidebar/ListingUpdated.tsx +5 -1
  68. package/src/page_components/listing/listing_sidebar/OrDivider.tsx +4 -2
  69. package/src/page_components/listing/listing_sidebar/ReferralApplication.tsx +7 -4
  70. package/src/page_components/listing/listing_sidebar/events/DownloadLotteryResults.tsx +6 -1
  71. package/src/page_components/sign-in/FormSignIn.tsx +1 -1
  72. package/src/page_components/sign-in/FormSignInErrorBox.tsx +1 -1
  73. package/src/sections/InfoCardGrid.scss +1 -1
  74. package/src/sections/InfoCardGrid.tsx +4 -1
  75. package/src/sections/ListSection.tsx +1 -1
  76. package/src/tables/AgTable.tsx +56 -26
  77. package/src/tables/StandardTable.tsx +19 -7
  78. package/src/text/Tag.scss +7 -0
  79. package/src/text/Tag.tsx +2 -0
@@ -8,9 +8,11 @@
8
8
  --selection-parent-accent: var(--bloom-color-gray-450);
9
9
  --hover-link-color: var(--bloom-color-primary);
10
10
  --hover-background-color: var(--bloom-color-primary-lighter);
11
+ --background-color: var(--bloom-color-white);
11
12
 
12
13
  border: var(--border);
13
14
  border-radius: var(--border-radius);
15
+ background-color: var(--background-color);
14
16
 
15
17
  & > ul {
16
18
  & > li:first-child > a {
@@ -70,3 +72,57 @@
70
72
  padding-inline-start: calc(var(--current-padding-inline) + var(--current-padding-block));
71
73
  }
72
74
  }
75
+
76
+ .side-nav__horizontal {
77
+ display: flex;
78
+
79
+ ul {
80
+ width: 100%;
81
+ }
82
+
83
+ @media (min-width: $screen-sm) {
84
+ a {
85
+ &[aria-current]:not(:focus) {
86
+ box-shadow: inset 0px -3px 0px 0px var(--hover-link-color);
87
+ }
88
+
89
+ &.has-current-child:not(:focus) {
90
+ box-shadow: inset 0px 0px -3px 0px var(--selection-parent-accent);
91
+ }
92
+ }
93
+
94
+ ul {
95
+ width: auto;
96
+ display: flex;
97
+ flex-direction: row;
98
+ @media (min-width: $screen-md) {
99
+ flex-direction: row;
100
+ }
101
+ @media (max-width: $screen-sm) {
102
+ flex-direction: column;
103
+ width: 100%;
104
+ }
105
+ }
106
+
107
+ li:not(:last-child) {
108
+ border-right: var(--border);
109
+ border-bottom: 0px;
110
+ }
111
+
112
+ & > ul {
113
+ & > li:first-child > a {
114
+ border-bottom-left-radius: var(--border-radius);
115
+ border-bottom-right-radius: 0px;
116
+ }
117
+
118
+ & > li:last-child > a {
119
+ border-bottom-right-radius: var(--border-radius);
120
+ border-bottom-left-radius: 0px;
121
+ }
122
+ }
123
+ }
124
+ }
125
+
126
+ .side-nav__count {
127
+ margin-left: var(--bloom-s4);
128
+ }
@@ -11,8 +11,8 @@ export interface SideNavItemProps {
11
11
  }
12
12
 
13
13
  export interface SideNavProps {
14
- navItems?: SideNavItemProps[]
15
14
  className?: string
15
+ navItems?: SideNavItemProps[]
16
16
  }
17
17
 
18
18
  const ItemLabel = ({ item }: { item: SideNavItemProps }) => {
@@ -20,7 +20,7 @@ const ItemLabel = ({ item }: { item: SideNavItemProps }) => {
20
20
  return (
21
21
  <>
22
22
  <span>{item.label}</span>
23
- <span>{item.count}</span>
23
+ <span className={"side-nav__count"}>{item.count}</span>
24
24
  </>
25
25
  )
26
26
  } else {
@@ -13,7 +13,7 @@
13
13
  @apply block;
14
14
  @apply px-6 pb-3;
15
15
  @apply border-b-2;
16
- @apply text-gray-700;
16
+ @apply text-gray-750;
17
17
  @apply items-center;
18
18
  border-color: transparent;
19
19
  line-height: 1.5rem;
@@ -58,7 +58,7 @@ const TabNav = (props: { children: React.ReactNode; className?: string }) => {
58
58
  }
59
59
 
60
60
  return (
61
- <nav className={classes.join(" ")}>
61
+ <nav className={classes.join(" ")} aria-label={"Secondary navigation"}>
62
62
  <ul role="tablist" aria-label="Secondary navigation">
63
63
  {props.children}
64
64
  </ul>
@@ -10,6 +10,29 @@
10
10
  }
11
11
  }
12
12
 
13
+ .tabs__horizontal {
14
+ ul {
15
+ @apply flex;
16
+ @apply flex-row;
17
+ }
18
+
19
+ .tabs__tab {
20
+ &:first-of-type {
21
+ @apply border-l;
22
+ @apply rounded-tl-lg;
23
+ @apply rounded-tr-lg;
24
+ @apply rounded-tr-none;
25
+ @apply rounded-bl-lg;
26
+ }
27
+ &:last-of-type {
28
+ @apply rounded-tr-lg;
29
+ @apply rounded-br-lg;
30
+ }
31
+
32
+ border-bottom-color: var(--bloom-color-gray-450);
33
+ }
34
+ }
35
+
13
36
  .tabs__tab {
14
37
  @apply bg-white;
15
38
  @apply text-gray-800;
@@ -30,14 +53,10 @@
30
53
  @apply border-l;
31
54
  @apply rounded-tl-lg;
32
55
  @apply rounded-tr-lg;
33
- @screen md {
34
- @apply rounded-tr-none;
35
- }
56
+ @apply rounded-tr-none;
36
57
  }
37
58
  &:last-of-type {
38
- @screen md {
39
- @apply rounded-tr-lg;
40
- }
59
+ @apply rounded-tr-lg;
41
60
  }
42
61
  &:hover {
43
62
  border-bottom-color: map-get($tailwind-gray, 400);
@@ -0,0 +1,41 @@
1
+ import { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
2
+ import { AlertBox } from "./AlertBox"
3
+
4
+ # Alert Box
5
+
6
+ The alert box component displays a themed notice with text.
7
+
8
+ <Canvas>
9
+ <Story id="notifications-alert-box" />
10
+ </Canvas>
11
+
12
+ ## Component Properties
13
+
14
+ <ArgsTable of={AlertBox} />
15
+
16
+ ## Theming Variables
17
+
18
+ <Canvas>
19
+ <Story id="notifications-alert-box--style-overrides" />
20
+ </Canvas>
21
+
22
+ You can apply CSS variables to the `.alert-box` selector to customize the appearance of the component.
23
+
24
+ | Name | Type | Description | Default |
25
+ | ----------------------------------- | ----------- | ------------------------------------- | ----------------------------- |
26
+ | `--vertical-padding` | Size | Vertical internal padding | `--bloom-s3` |
27
+ | `--horizontal-padding` | Size | Horizontal internal padding | `--bloom-s4` |
28
+ | `--background-color` | Color | Background color | `--bloom-color-primary-light` |
29
+ | `--alert-background-color` | Color | Alert theme background color | `--bloom-color-alert-light` |
30
+ | `--alert-invert-background-color` | Color | Alert invert theme background color | `--bloom-color-alert` |
31
+ | `--notice-background-color` | Color | Notice theme background color | `--bloom-color-primary-light` |
32
+ | `--notice-invert-background-color` | Color | Notice invert theme background color | `--bloom-color-primary` |
33
+ | `--success-background-color` | Color | Success theme background color | `--bloom-color-success-light` |
34
+ | `--success-invert-background-color` | Color | Success invert theme background color | `--bloom-color-success` |
35
+ | `--warn-background-color` | Color | Warn theme background color | `--bloom-color-warn-light` |
36
+ | `--warn-invert-background-color` | Color | Warn invert theme background color | `--bloom-color-warn` |
37
+ | `--text-color` | Color | Content text color | `--bloom-color-gray-900` |
38
+ | `--close-icon-color` | Color | Close icon color | `--bloom-color-gray-900` |
39
+ | `--font-weight` | Font weight | Content text font weight | `600` |
40
+ | `--max-width` | Size | Max width | `--bloom-width-5xl` |
41
+ | `--line-height` | Line height | Content text line height | `1.375` |
@@ -1,86 +1,123 @@
1
1
  .alert-box {
2
- @apply relative;
3
- @apply py-3;
4
- @apply px-4;
5
- @apply leading-snug;
6
- @apply flex;
7
- @apply items-center;
2
+ --vertical-padding: var(--bloom-s3);
3
+ --horizontal-padding: var(--bloom-s4);
4
+ --background-color: var(--bloom-color-primary-light);
5
+ --alert-background-color: var(--bloom-color-alert-light);
6
+ --alert-invert-background-color: var(--bloom-color-alert);
7
+ --notice-background-color: var(--bloom-color-primary-light);
8
+ --notice-invert-background-color: var(--bloom-color-primary);
9
+ --success-background-color: var(--bloom-color-success-light);
10
+ --success-invert-background-color: var(--bloom-color-success);
11
+ --warn-background-color: var(--bloom-color-warn-light);
12
+ --warn-invert-background-color: var(--bloom-color-warn);
13
+ --text-color: var(--bloom-color-gray-900);
14
+ --close-icon-color: var(--bloom-color-gray-900);
15
+ --font-weight: 500;
16
+ --max-width: var(--bloom-width-5xl);
17
+ --line-height: 1.375;
18
+
19
+ padding: var(--vertical-padding) var(--horizontal-padding);
20
+ background-color: var(--background-color);
21
+ color: var(--text-color);
22
+ font-weight: var(--font-weight);
23
+ position: relative;
24
+ display: flex;
25
+ align-items: center;
26
+ line-height: var(--line-height);
8
27
 
9
28
  .alert-box_inner {
10
- @apply m-auto;
11
- @apply max-w-5xl;
12
- @apply px-4;
13
- @apply flex-1;
14
- @apply flex;
15
- @apply items-center;
29
+ margin: auto;
30
+ max-width: var(--max-width);
31
+ padding-right: var(--horizontal-padding);
32
+ padding-left: var(--horizontal-padding);
33
+ flex: 1;
34
+ display: flex;
35
+ align-items: center;
16
36
  }
17
37
 
18
38
  &.narrow {
19
- padding-top: 0.35rem;
20
- padding-bottom: 0.35rem;
39
+ padding-top: var(--bloom-s1_5);
40
+ padding-bottom: var(--bloom-s1_5);
21
41
  }
22
42
 
23
- // Inverts color scheme of alert
24
43
  &.invert {
25
- @apply text-white;
26
-
27
- .close {
28
- @apply text-white;
44
+ color: var(--bloom-color-white);
45
+ a {
46
+ color: var(--bloom-color-white);
47
+ text-decoration: underline;
29
48
  }
30
49
  }
31
50
 
32
51
  &.alert {
33
- @apply bg-alert-light;
52
+ background-color: var(--alert-background-color);
34
53
 
35
54
  &.invert {
36
- @apply bg-alert;
55
+ background-color: var(--alert-invert-background-color);
37
56
  }
38
57
  }
39
58
 
40
59
  &.primary {
41
- @apply bg-primary-light;
60
+ background-color: var(--notice-background-color);
42
61
 
43
62
  &.invert {
44
- @apply bg-primary;
63
+ background-color: var(--notice-invert-background-color);
45
64
  }
46
65
  }
47
66
 
48
67
  &.success {
49
- @apply bg-success-light;
68
+ background-color: var(--success-background-color);
50
69
 
51
70
  &.invert {
52
- @apply bg-success;
71
+ background-color: var(--success-invert-background-color);
53
72
  }
54
73
  }
55
74
 
56
75
  &.warn {
57
- @apply bg-warn-light;
58
-
59
- &.invert {
60
- @apply bg-warn;
61
- }
76
+ background-color: var(--warn-background-color);
62
77
  }
63
78
  }
64
79
 
65
80
  .alert-box__head {
66
- @apply flex justify-between;
67
- @apply w-full;
81
+ display: flex;
82
+ justify-content: space-between;
83
+ width: 100%;
68
84
  }
69
85
 
70
86
  .alert-box__title {
71
- @apply flex justify-between;
87
+ display: flex;
88
+ justify-content: space-between;
89
+ align-items: center;
72
90
  }
73
91
 
74
92
  .alert-box__body {
75
- @apply ml-2;
76
- @apply font-semibold;
77
- @apply text-tiny;
93
+ font-weight: var(--font-weight);
94
+ font-size: var(--bloom-font-size-tiny);
78
95
  }
79
96
 
80
97
  .alert-box__close {
81
- @apply text-3xl;
82
- right: 1rem;
83
- @apply ml-3;
84
- @apply p-0;
85
- line-height: 1rem;
98
+ font-size: var(--bloom-font-size-3xl);
99
+ right: var(--horizontal-padding);
100
+ margin-left: var(--bloom-s3);
101
+ padding: 0;
102
+ line-height: var(--bloom-s4);
103
+ color: var(--close-icon-color);
104
+ }
105
+
106
+ .alert-box__icon {
107
+ margin-right: var(--bloom-s3);
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);
86
123
  }
@@ -6,20 +6,23 @@ import { colorClasses } from "./alertTypes"
6
6
  import "./AlertBox.scss"
7
7
 
8
8
  export interface AlertBoxProps {
9
- type?: AlertTypes
10
- closeable?: boolean
11
- onClose?: () => void
9
+ boundToLayoutWidth?: boolean
12
10
  children: ReactNode
13
- inverted?: boolean
14
11
  className?: string
15
- boundToLayoutWidth?: boolean
12
+ closeable?: boolean
13
+ customIcon?: IconTypes
14
+ inverted?: boolean
16
15
  narrow?: boolean
16
+ onClose?: () => void
17
+ sticky?: boolean
18
+ type?: AlertTypes
17
19
  }
18
20
 
19
21
  const icons: { [k in AlertTypes]: IconTypes } = {
20
22
  alert: "warning",
21
23
  notice: "info",
22
24
  success: "check",
25
+ warn: "warning",
23
26
  }
24
27
 
25
28
  const AlertBox = (props: AlertBoxProps) => {
@@ -28,11 +31,12 @@ const AlertBox = (props: AlertBoxProps) => {
28
31
 
29
32
  const classNames = [
30
33
  "alert-box",
31
- colorClasses[props.type || "alert"],
34
+ colorClasses[props.type || ""],
32
35
  ...(props.inverted ? ["invert"] : []),
33
36
  ...(props.className ? [props.className] : []),
34
37
  ...(props.boundToLayoutWidth ? [] : ["fullWidth"]),
35
38
  ...(props.narrow ? ["narrow"] : []),
39
+ ...(props.sticky ? ["alert-box__sticky"] : []),
36
40
  ].join(" ")
37
41
 
38
42
  if (onClose) closeable = true
@@ -47,14 +51,16 @@ const AlertBox = (props: AlertBoxProps) => {
47
51
  <>
48
52
  <div className="alert-box__head">
49
53
  <div className="alert-box__title">
50
- <span className="alert-box__icon">
51
- <Icon
52
- size="medium"
53
- symbol={icons[props.type || "alert"]}
54
- fill={props.inverted ? IconFillColors.white : undefined}
55
- ariaHidden={true}
56
- />
57
- </span>
54
+ {(props.type || props.customIcon) && (
55
+ <span className="alert-box__icon">
56
+ <Icon
57
+ size="medium"
58
+ symbol={props.type ? icons[props.type] : props.customIcon ?? "warning"}
59
+ fill={props.inverted ? IconFillColors.white : undefined}
60
+ ariaHidden={true}
61
+ />
62
+ </span>
63
+ )}
58
64
  <span className="alert-box__body">
59
65
  {typeof props.children === "string" ? <p>{props.children}</p> : props.children}
60
66
  </span>
@@ -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>
@@ -8,6 +8,10 @@ import "./StatusMessage.scss"
8
8
  export interface StatusMessagesProps {
9
9
  lastTimestamp?: string
10
10
  children?: React.ReactNode
11
+ strings?: {
12
+ lastUpdated?: string
13
+ statusHistory?: string
14
+ }
11
15
  }
12
16
 
13
17
  export const StatusMessages = (props: StatusMessagesProps) => {
@@ -17,7 +21,7 @@ export const StatusMessages = (props: StatusMessagesProps) => {
17
21
  {props.lastTimestamp && (
18
22
  <li className="status-message">
19
23
  <div className="status-message__note text-center">
20
- {t("t.lastUpdated")}: {props.lastTimestamp}
24
+ {props.strings?.lastUpdated ?? t("t.lastUpdated")}: {props.lastTimestamp}
21
25
  </div>
22
26
  </li>
23
27
  )}
@@ -26,7 +30,9 @@ export const StatusMessages = (props: StatusMessagesProps) => {
26
30
  } else {
27
31
  return (
28
32
  <>
29
- <h3 className="status-messages__title">{t("t.statusHistory")}</h3>
33
+ <h3 className="status-messages__title">
34
+ {props.strings?.statusHistory ?? t("t.statusHistory")}
35
+ </h3>
30
36
  <ul className="status-messages">{props.children}</ul>
31
37
  </>
32
38
  )
@@ -2,6 +2,7 @@ export const colorClasses = {
2
2
  alert: "alert",
3
3
  notice: "primary",
4
4
  success: "success",
5
+ warn: "warn",
5
6
  }
6
7
 
7
8
  export type AlertTypes = keyof typeof colorClasses
@@ -16,6 +16,7 @@
16
16
 
17
17
  position: relative;
18
18
  max-width: var(--max-width);
19
+ max-height: 100vh;
19
20
  margin: auto;
20
21
  border: var(--modal-border);
21
22
  background-color: var(--background-color);
@@ -33,7 +34,7 @@
33
34
 
34
35
  .modal__title {
35
36
  padding-block: var(--bloom-s6) var(--bloom-s3);
36
- padding-inline: var(--bloom-s6);
37
+ padding-inline: var(--bloom-s6) var(--bloom-s12);
37
38
  color: var(--title-color);
38
39
  font-size: var(--title-font-size);
39
40
  font-family: var(--title-font-family);
@@ -52,6 +53,7 @@
52
53
  max-height: calc(100vh - 200px);
53
54
  overflow-y: auto;
54
55
  }
56
+
55
57
  p {
56
58
  color: var(--content-font-color);
57
59
  }
@@ -4,13 +4,13 @@
4
4
  }
5
5
 
6
6
  .application-timeline {
7
- .progress-nav__item {
7
+ .progress-nav__dot-item {
8
8
  @apply pt-0;
9
9
 
10
10
  text-transform: unset;
11
11
 
12
12
  .absolute {
13
- margin-top: 0.45rem;
13
+ margin-top: 0.25rem;
14
14
  z-index: 2;
15
15
  margin-left: -0.4rem;
16
16
  }
@@ -20,17 +20,17 @@
20
20
  }
21
21
  }
22
22
 
23
- .progress-nav__item.is-active::before,
24
- .progress-nav__item.is-disabled::before {
23
+ .progress-nav__dot-item.is-active::before,
24
+ .progress-nav__dot-item.is-disabled::before {
25
25
  height: 2rem;
26
26
  width: 2rem;
27
27
  }
28
28
 
29
- .progress-nav__item.is-active::before {
29
+ .progress-nav__dot-item.is-active::before {
30
30
  @apply bg-green-700;
31
31
  }
32
32
 
33
- .progress-nav__item::after {
33
+ .progress-nav__dot-item::after {
34
34
  top: 1rem;
35
35
  }
36
36
  }
@@ -4,27 +4,37 @@ import { Icon } from "../icons/Icon"
4
4
  import { t } from "../helpers/translator"
5
5
  import "./ApplicationTimeline.scss"
6
6
 
7
- const ApplicationTimeline = () => (
7
+ export interface ApplicationTimelineProps {
8
+ strings?: {
9
+ applicationReceived?: string
10
+ applicationsClosed?: string
11
+ applicationsRanked?: string
12
+ }
13
+ }
14
+ const ApplicationTimeline = (props: ApplicationTimelineProps) => (
8
15
  <ul
9
16
  className="progress-nav application-timeline"
10
17
  aria-label="Steps of processing your application"
11
18
  >
12
- <li className="progress-nav__item is-active" aria-current="step">
19
+ <li className="progress-nav__dot-item is-active" aria-current="step">
13
20
  <span className="text-white absolute">
14
21
  <Icon symbol="check" size="base" />
15
22
  </span>
16
23
  <Markdown className="font-bold" options={{ disableParsingRawHTML: true }}>
17
- {t("application.review.confirmation.applicationReceived")}
24
+ {props.strings?.applicationReceived ??
25
+ t("application.review.confirmation.applicationReceived")}
18
26
  </Markdown>
19
27
  </li>
20
- <li className="progress-nav__item is-disabled">
28
+ <li className="progress-nav__dot-item is-disabled">
21
29
  <Markdown options={{ disableParsingRawHTML: true }}>
22
- {t("application.review.confirmation.applicationsClosed")}
30
+ {props.strings?.applicationsClosed ??
31
+ t("application.review.confirmation.applicationsClosed")}
23
32
  </Markdown>
24
33
  </li>
25
- <li className="progress-nav__item is-disabled">
34
+ <li className="progress-nav__dot-item is-disabled">
26
35
  <Markdown options={{ disableParsingRawHTML: true }}>
27
- {t("application.review.confirmation.applicationsRanked")}
36
+ {props.strings?.applicationsRanked ??
37
+ t("application.review.confirmation.applicationsRanked")}
28
38
  </Markdown>
29
39
  </li>
30
40
  </ul>
@@ -17,12 +17,12 @@ type NavigationHeaderTabs = {
17
17
  flagsQty?: number
18
18
  listingLabel: string
19
19
  applicationsLabel: string
20
- flagsLabel: string
21
20
  }
22
21
 
23
22
  type NavigationHeaderTabsElement = {
24
23
  label: string
25
24
  path: string
25
+ activePaths: string[]
26
26
  content: React.ReactNode | undefined
27
27
  }
28
28
 
@@ -42,23 +42,23 @@ const NavigationHeader = ({
42
42
  {
43
43
  label: tabs?.listingLabel || "",
44
44
  path: `/listings/${listingId}`,
45
+ activePaths: [`/listings/${listingId}`],
45
46
  content: undefined,
46
47
  },
47
48
  {
48
49
  label: tabs?.applicationsLabel || "",
49
50
  path: `/listings/${listingId}/applications`,
51
+ activePaths: [
52
+ `/listings/${listingId}/applications`,
53
+ `/listings/${listingId}/applications/pending`,
54
+ `/listings/${listingId}/applications/pending?type=name_dob`,
55
+ `/listings/${listingId}/applications/pending?type=email`,
56
+ `/listings/${listingId}/applications/resolved`,
57
+ ],
50
58
  content: undefined,
51
59
  },
52
60
  ]
53
61
 
54
- if (process.env.showDuplicates && typeof tabs?.flagsQty === "number") {
55
- elements.push({
56
- label: tabs.flagsLabel,
57
- path: `/listings/${listingId}/flags`,
58
- content: <>{tabs.flagsQty}</>,
59
- })
60
- }
61
-
62
62
  return elements
63
63
  }, [tabs, listingId])
64
64
 
@@ -69,7 +69,7 @@ const NavigationHeader = ({
69
69
  <TabNavItem
70
70
  key={tab.path}
71
71
  tagContent={tab?.content}
72
- current={tab.path === currentPath}
72
+ current={tab.activePaths.includes(currentPath)}
73
73
  href={tab.path}
74
74
  tagSize={AppearanceSizeType.small}
75
75
  >
@@ -53,7 +53,7 @@ const FormForgotPassword = ({
53
53
  <FormCard>
54
54
  <div className="form-card__lead text-center border-b mx-0">
55
55
  <Icon size="2xl" symbol="profile" />
56
- <h2 className="form-card__title">{t("authentication.forgotPassword.sendEmail")}</h2>
56
+ <h1 className="form-card__title">{t("authentication.forgotPassword.sendEmail")}</h1>
57
57
  </div>
58
58
 
59
59
  {Object.entries(errors).length > 0 && !networkError.error && (
@@ -22,7 +22,7 @@ const AdditionalFees = ({
22
22
  footerContent,
23
23
  strings,
24
24
  }: AdditionalFeesProps) => {
25
- if (!deposit && !applicationFee && !strings && footerContent?.length === 0) return <></>
25
+ if (!deposit && !applicationFee && (!footerContent || footerContent?.length === 0)) return <></>
26
26
  return (
27
27
  <div className="info-card bg-gray-100 border-0">
28
28
  <p className="info-card__title mb-2">{strings.sectionHeader}</p>