@bloom-housing/ui-components 5.1.1-alpha.29 → 5.1.1-alpha.30

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,14 @@
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.30](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.29...@bloom-housing/ui-components@5.1.1-alpha.30) (2022-09-26)
7
+
8
+ **Note:** Version bump only for package @bloom-housing/ui-components
9
+
10
+
11
+
12
+
13
+
6
14
  ## [5.1.1-alpha.29](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.28...@bloom-housing/ui-components@5.1.1-alpha.29) (2022-09-23)
7
15
 
8
16
  **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.29",
3
+ "version": "5.1.1-alpha.30",
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": "1dae8aeb6a65694cfd7c0637a7164e75a1810f87"
113
+ "gitHead": "af9fb2b897054ec661504b66af92b9b0b4992d1d"
114
114
  }
@@ -614,9 +614,12 @@
614
614
  "listings.apply.submitPaperNoDueDateNoPostMark": "%{developer} is not responsible for lost or delayed mail.",
615
615
  "listings.apply.submitPaperNoDueDatePostMark": "Applications must be received by the deadline. If sending by U.S. Mail, the application must be received by mail no later than %{postmarkReceivedByDate}. Applications received after %{postmarkReceivedByDate} via mail will not be accepted. %{developer} is not responsible for lost or delayed mail.",
616
616
  "listings.availableAndWaitlist": "Available Units & Open Waitlist",
617
- "listings.availableUnitsDescription": "Applicants will be reviewed in order until all vacancies are filled.",
617
+ "listings.availableUnitsDescription": "Applicants will be reviewed in lottery rank order until all vacancies are filled.",
618
618
  "listings.availableUnitsAndWaitlist": "Available units and waitlist",
619
619
  "listings.availableUnitsAndWaitlistDesc": "Once applicants fill all available units, additional applicants will be placed on the waitlist for <span class='t-italic'>%{number} units</span>",
620
+ "listings.vacantUnit": "Vacant Unit",
621
+ "listings.vacantUnits": "Vacant Units",
622
+ "listings.vacantUnitsAvailable": "Vacant Units Available",
620
623
  "listings.availableUnit": "Available Unit",
621
624
  "listings.availableUnits": "Available Units",
622
625
  "listings.bath": "bath",
@@ -86,3 +86,7 @@
86
86
  margin-inline-start: var(--bloom-s1);
87
87
  }
88
88
  }
89
+ .listings-pill_header {
90
+ margin-bottom: var(--bloom-s3);
91
+ margin-top: var(--bloom-s1);
92
+ }
@@ -5,7 +5,7 @@ import { StackedTable, StackedTableProps } from "../../tables/StackedTable"
5
5
  import { StandardTable, StandardTableProps } from "../../tables/StandardTable"
6
6
  import { Heading, HeaderType } from "../../headers/Heading"
7
7
  import { Tag } from "../../text/Tag"
8
- import { AppearanceStyleType } from "../../global/AppearanceTypes"
8
+ import { AppearanceShadeType, AppearanceStyleType } from "../../global/AppearanceTypes"
9
9
  import { Icon, IconFillColors } from "../../icons/Icon"
10
10
  import "./ListingCard.scss"
11
11
  import { NavigationContext } from "../../config/NavigationContext"
@@ -16,6 +16,7 @@ export interface CardHeader {
16
16
  content: string | React.ReactNode
17
17
  href?: string
18
18
  customClass?: string
19
+ styleType?: AppearanceStyleType
19
20
  }
20
21
 
21
22
  export interface FooterButton {
@@ -74,12 +75,26 @@ const ListingCard = (props: ListingCardProps) => {
74
75
  const getHeader = (
75
76
  header: CardHeader | undefined,
76
77
  priority: number,
77
- style?: HeaderType,
78
+ styleType?: HeaderType,
79
+ pillStyle?: boolean,
78
80
  customClass?: string
79
81
  ) => {
80
82
  if (header && header.content) {
83
+ if (pillStyle) {
84
+ return (
85
+ <Tag
86
+ className="listings-pill_header"
87
+ pillStyle
88
+ capitalized
89
+ styleType={header.styleType}
90
+ shade={AppearanceShadeType.light}
91
+ >
92
+ {header.content}
93
+ </Tag>
94
+ )
95
+ }
81
96
  return (
82
- <Heading priority={priority} style={style} className={customClass}>
97
+ <Heading priority={priority} style={styleType} className={customClass}>
83
98
  {header.href ? (
84
99
  <LinkComponent className="is-card-link" href={header.href}>
85
100
  {header.content}
@@ -97,8 +112,8 @@ const ListingCard = (props: ListingCardProps) => {
97
112
  const getContentHeader = () => {
98
113
  return (
99
114
  <div className="listings-row_headers">
100
- {getHeader(contentProps?.contentHeader, 2, "cardHeader", "order-1")}
101
- {getHeader(contentProps?.contentSubheader, 3, "cardSubheader", "order-2")}
115
+ {getHeader(contentProps?.contentHeader, 2, "cardHeader", false, "order-1")}
116
+ {getHeader(contentProps?.contentSubheader, 3, "cardSubheader", false, "order-2")}
102
117
  {cardTags && cardTags?.length > 0 && (
103
118
  <div className="listings-row_tags">
104
119
  {cardTags?.map((cardTag, index) => {
@@ -130,7 +145,7 @@ const ListingCard = (props: ListingCardProps) => {
130
145
  <hr className={"mb-2"} />
131
146
  )}
132
147
  <div className={"listings-row_headers"}>
133
- {getHeader(contentProps?.tableHeader, 4, "tableHeader")}
148
+ {getHeader(contentProps?.tableHeader, 4, "tableHeader", true)}
134
149
  {getHeader(contentProps?.tableSubheader, 5, "tableSubheader")}
135
150
  </div>
136
151
  {children && children}
package/src/text/Tag.scss CHANGED
@@ -11,6 +11,8 @@
11
11
  --pill-font-weight: 600;
12
12
  --pill-text-transform: uppercase;
13
13
  --pill-letter-spacing: var(--bloom-letter-spacing-ultrawide);
14
+ --pill-capitalized-text-transform: capitalized;
15
+ --pill-capitalized-letter-spacing: var(--bloom-letter-spacing-wide);
14
16
 
15
17
  --small-pill-padding: var(--bloom-s1) var(--bloom-s3);
16
18
  --small-pill-font-size: var(--bloom-font-size-2xs);
@@ -129,4 +131,9 @@
129
131
  padding-block: var(--bloom-s2);
130
132
  padding-inline: var(--bloom-s4);
131
133
  }
134
+
135
+ &.is-capitalized {
136
+ text-transform: var(--pill-capitalized-text-transform);
137
+ letter-spacing: var(--pill-capitalized-letter-spacing);
138
+ }
132
139
  }
package/src/text/Tag.tsx CHANGED
@@ -5,6 +5,7 @@ import "./Tag.scss"
5
5
  export interface TagProps extends AppearanceProps {
6
6
  className?: string
7
7
  pillStyle?: boolean
8
+ capitalized?: boolean
8
9
  children: React.ReactNode
9
10
  fillContainer?: boolean
10
11
  }
@@ -14,6 +15,7 @@ export const Tag = (props: TagProps) => {
14
15
 
15
16
  if (props.pillStyle) tagClasses.push("is-pill")
16
17
  if (props.fillContainer) tagClasses.push("fill-container")
18
+ if (props.capitalized) tagClasses.push("is-capitalized")
17
19
  if (props.className) tagClasses.push(props.className)
18
20
 
19
21
  return <span className={tagClasses.join(" ")}>{props.children}</span>