@bloom-housing/ui-components 8.0.1 → 8.0.3
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/dist/src/page_components/listing/listing_sidebar/Contact.d.ts +3 -1
- package/dist/src/page_components/listing/listing_sidebar/Contact.js +5 -2
- package/dist/src/page_components/listing/listing_sidebar/Contact.js.map +1 -1
- package/dist/src/page_components/listing/listing_sidebar/Contact.stories.d.ts +1 -1
- package/dist/src/text/Description.js +3 -3
- package/package.json +1 -1
- package/src/navigation/ProgressNav.scss +2 -2
- package/src/page_components/listing/listing_sidebar/Contact.tsx +6 -1
- package/src/text/Description.scss +14 -5
- package/src/text/Description.tsx +4 -4
|
@@ -23,6 +23,8 @@ export interface ContactProps {
|
|
|
23
23
|
contactPhoneNumberNote?: string;
|
|
24
24
|
/** The contact's title */
|
|
25
25
|
contactTitle?: string;
|
|
26
|
+
/** Classnames to style the contact's title */
|
|
27
|
+
contactTitleClassname?: string;
|
|
26
28
|
/** The text for the section's header */
|
|
27
29
|
sectionTitle: string;
|
|
28
30
|
strings: {
|
|
@@ -32,5 +34,5 @@ export interface ContactProps {
|
|
|
32
34
|
};
|
|
33
35
|
}
|
|
34
36
|
/** Displays information about a contact, including their address, contact information, and notes */
|
|
35
|
-
declare const Contact: ({ additionalInformation, contactAddress, contactCompany, contactEmail, contactName, contactPhoneNumber, contactPhoneNumberNote, contactTitle, sectionTitle, strings, }: ContactProps) => JSX.Element;
|
|
37
|
+
declare const Contact: ({ additionalInformation, contactAddress, contactCompany, contactEmail, contactName, contactPhoneNumber, contactPhoneNumberNote, contactTitle, contactTitleClassname, sectionTitle, strings, }: ContactProps) => JSX.Element;
|
|
36
38
|
export { Contact as default, Contact };
|
|
@@ -4,17 +4,20 @@ import { Icon, IconFillColors } from "../../../icons/Icon";
|
|
|
4
4
|
import { Heading } from "../../../text/Heading";
|
|
5
5
|
/** Displays information about a contact, including their address, contact information, and notes */
|
|
6
6
|
var Contact = function (_a) {
|
|
7
|
-
var additionalInformation = _a.additionalInformation, contactAddress = _a.contactAddress, contactCompany = _a.contactCompany, contactEmail = _a.contactEmail, contactName = _a.contactName, contactPhoneNumber = _a.contactPhoneNumber, contactPhoneNumberNote = _a.contactPhoneNumberNote, contactTitle = _a.contactTitle, sectionTitle = _a.sectionTitle, strings = _a.strings;
|
|
7
|
+
var additionalInformation = _a.additionalInformation, contactAddress = _a.contactAddress, contactCompany = _a.contactCompany, contactEmail = _a.contactEmail, contactName = _a.contactName, contactPhoneNumber = _a.contactPhoneNumber, contactPhoneNumberNote = _a.contactPhoneNumberNote, contactTitle = _a.contactTitle, contactTitleClassname = _a.contactTitleClassname, sectionTitle = _a.sectionTitle, strings = _a.strings;
|
|
8
8
|
var formattedPhoneLink = contactPhoneNumber
|
|
9
9
|
? "tel:".concat(contactPhoneNumber.replace(/[-()]/g, ""))
|
|
10
10
|
: undefined;
|
|
11
11
|
var formattedCompanyWebsite = (contactCompany === null || contactCompany === void 0 ? void 0 : contactCompany.website) && !(contactCompany === null || contactCompany === void 0 ? void 0 : contactCompany.website.startsWith("http"))
|
|
12
12
|
? "http://".concat(contactCompany === null || contactCompany === void 0 ? void 0 : contactCompany.website)
|
|
13
13
|
: contactCompany === null || contactCompany === void 0 ? void 0 : contactCompany.website;
|
|
14
|
+
var contactTitleClasses = ["text-gray-700"];
|
|
15
|
+
if (contactTitleClassname)
|
|
16
|
+
contactTitleClasses.push(contactTitleClassname);
|
|
14
17
|
return (React.createElement("section", { className: "aside-block" },
|
|
15
18
|
React.createElement(Heading, { priority: 4, styleType: "underlineWeighted" }, sectionTitle),
|
|
16
19
|
contactName && React.createElement("p", { className: "text-xl" }, contactName),
|
|
17
|
-
contactTitle && React.createElement("p", { className: "
|
|
20
|
+
contactTitle && React.createElement("p", { className: contactTitleClasses.join(" ") }, contactTitle),
|
|
18
21
|
(contactCompany === null || contactCompany === void 0 ? void 0 : contactCompany.name) && React.createElement("p", { className: "text-gray-700" }, contactCompany.name),
|
|
19
22
|
contactPhoneNumber && (React.createElement(React.Fragment, null,
|
|
20
23
|
React.createElement("p", { className: "mt-3" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Contact.js","sourceRoot":"","sources":["../../../../../src/page_components/listing/listing_sidebar/Contact.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;
|
|
1
|
+
{"version":3,"file":"Contact.js","sourceRoot":"","sources":["../../../../../src/page_components/listing/listing_sidebar/Contact.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACjD,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AAE1D,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AA0B/C,oGAAoG;AACpG,IAAM,OAAO,GAAG,UAAC,EAYF;QAXb,qBAAqB,2BAAA,EACrB,cAAc,oBAAA,EACd,cAAc,oBAAA,EACd,YAAY,kBAAA,EACZ,WAAW,iBAAA,EACX,kBAAkB,wBAAA,EAClB,sBAAsB,4BAAA,EACtB,YAAY,kBAAA,EACZ,qBAAqB,2BAAA,EACrB,YAAY,kBAAA,EACZ,OAAO,aAAA;IAEP,IAAM,kBAAkB,GAAG,kBAAkB;QAC3C,CAAC,CAAC,cAAO,kBAAkB,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAE;QACnD,CAAC,CAAC,SAAS,CAAA;IACb,IAAM,uBAAuB,GAC3B,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,OAAO,KAAI,CAAC,CAAA,cAAc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
|
title: string;
|
|
3
|
-
component: ({ additionalInformation, contactAddress, contactCompany, contactEmail, contactName, contactPhoneNumber, contactPhoneNumberNote, contactTitle, sectionTitle, strings, }: import("./Contact").ContactProps) => JSX.Element;
|
|
3
|
+
component: ({ additionalInformation, contactAddress, contactCompany, contactEmail, contactName, contactPhoneNumber, contactPhoneNumberNote, contactTitle, contactTitleClassname, sectionTitle, strings, }: import("./Contact").ContactProps) => JSX.Element;
|
|
4
4
|
};
|
|
5
5
|
export default _default;
|
|
6
6
|
export declare const NoAddress: () => JSX.Element;
|
|
@@ -17,8 +17,8 @@ export var Description = function (props) {
|
|
|
17
17
|
if (props.dtClassName)
|
|
18
18
|
dtClasses.push(props.dtClassName);
|
|
19
19
|
return (React.createElement(React.Fragment, null,
|
|
20
|
-
React.createElement("
|
|
21
|
-
props.markdown ? (React.createElement("
|
|
22
|
-
React.createElement(Markdown, { options: __assign({ disableParsingRawHTML: true }, props.markdownProps), children: props.description }))) : (React.createElement("
|
|
20
|
+
React.createElement("dt", { className: "description__title" }, props.term),
|
|
21
|
+
props.markdown ? (React.createElement("dd", { className: dtClasses.join(" ") },
|
|
22
|
+
React.createElement(Markdown, { options: __assign({ disableParsingRawHTML: true }, props.markdownProps), children: props.description }))) : (React.createElement("dd", { className: dtClasses.join(" ") }, props.description))));
|
|
23
23
|
};
|
|
24
24
|
//# sourceMappingURL=Description.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloom-housing/ui-components",
|
|
3
|
-
"version": "8.0.
|
|
3
|
+
"version": "8.0.3",
|
|
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/ui-components",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
text-align: center;
|
|
36
36
|
text-transform: var(--dot-text-transform);
|
|
37
37
|
display: table-cell;
|
|
38
|
-
white-space:
|
|
38
|
+
white-space: normal;
|
|
39
39
|
float: none;
|
|
40
40
|
@media (min-width: $screen-md) {
|
|
41
41
|
font-size: var(--dot-font-size-desktop);
|
|
@@ -120,7 +120,7 @@
|
|
|
120
120
|
padding-left: var(--bar-label-padding-left);
|
|
121
121
|
position: relative;
|
|
122
122
|
display: table-cell;
|
|
123
|
-
white-space:
|
|
123
|
+
white-space: normal;
|
|
124
124
|
float: none;
|
|
125
125
|
max-width: 20%;
|
|
126
126
|
border-top-width: var(--bar-height);
|
|
@@ -21,6 +21,8 @@ export interface ContactProps {
|
|
|
21
21
|
contactPhoneNumberNote?: string
|
|
22
22
|
/** The contact's title */
|
|
23
23
|
contactTitle?: string
|
|
24
|
+
/** Classnames to style the contact's title */
|
|
25
|
+
contactTitleClassname?: string
|
|
24
26
|
/** The text for the section's header */
|
|
25
27
|
sectionTitle: string
|
|
26
28
|
strings: { email?: string; getDirections: string; website?: string }
|
|
@@ -36,6 +38,7 @@ const Contact = ({
|
|
|
36
38
|
contactPhoneNumber,
|
|
37
39
|
contactPhoneNumberNote,
|
|
38
40
|
contactTitle,
|
|
41
|
+
contactTitleClassname,
|
|
39
42
|
sectionTitle,
|
|
40
43
|
strings,
|
|
41
44
|
}: ContactProps) => {
|
|
@@ -46,6 +49,8 @@ const Contact = ({
|
|
|
46
49
|
contactCompany?.website && !contactCompany?.website.startsWith("http")
|
|
47
50
|
? `http://${contactCompany?.website}`
|
|
48
51
|
: contactCompany?.website
|
|
52
|
+
const contactTitleClasses = ["text-gray-700"]
|
|
53
|
+
if (contactTitleClassname) contactTitleClasses.push(contactTitleClassname)
|
|
49
54
|
|
|
50
55
|
return (
|
|
51
56
|
<section className="aside-block">
|
|
@@ -54,7 +59,7 @@ const Contact = ({
|
|
|
54
59
|
</Heading>
|
|
55
60
|
|
|
56
61
|
{contactName && <p className="text-xl">{contactName}</p>}
|
|
57
|
-
{contactTitle && <p className="
|
|
62
|
+
{contactTitle && <p className={contactTitleClasses.join(" ")}>{contactTitle}</p>}
|
|
58
63
|
{contactCompany?.name && <p className="text-gray-700">{contactCompany.name}</p>}
|
|
59
64
|
|
|
60
65
|
{contactPhoneNumber && (
|
|
@@ -18,35 +18,44 @@
|
|
|
18
18
|
.column-definition-list {
|
|
19
19
|
@include clearfix;
|
|
20
20
|
|
|
21
|
+
@screen md {
|
|
22
|
+
@apply grid;
|
|
23
|
+
grid-template-columns: 1fr 1fr;
|
|
24
|
+
@apply gap-x-4;
|
|
25
|
+
grid-row-gap: 0.15rem;
|
|
26
|
+
}
|
|
27
|
+
|
|
21
28
|
.description__title {
|
|
22
29
|
@apply text-xl;
|
|
23
30
|
@apply text-gray-800;
|
|
24
31
|
@apply mb-3;
|
|
25
32
|
clear: left;
|
|
33
|
+
height: max-content;
|
|
34
|
+
@apply w-full;
|
|
26
35
|
|
|
27
36
|
@screen md {
|
|
28
37
|
@apply pl-4;
|
|
29
38
|
@apply border-l-2;
|
|
30
39
|
@apply border-gray-450;
|
|
31
40
|
@apply float-left;
|
|
32
|
-
@apply w-1/3;
|
|
33
|
-
@apply pr-3;
|
|
34
|
-
margin-top: 0.15rem;
|
|
35
41
|
}
|
|
36
42
|
}
|
|
37
43
|
|
|
38
44
|
.description__body {
|
|
39
45
|
@apply text-sm;
|
|
40
46
|
@apply mb-5;
|
|
47
|
+
@apply w-full;
|
|
41
48
|
|
|
42
49
|
@screen md {
|
|
43
50
|
@apply mb-0;
|
|
44
51
|
@apply float-left;
|
|
45
|
-
|
|
52
|
+
&:last-of-type {
|
|
53
|
+
@apply col-span-2;
|
|
54
|
+
}
|
|
46
55
|
}
|
|
47
56
|
|
|
48
57
|
&:last-of-type {
|
|
49
|
-
@apply w-full
|
|
58
|
+
@apply w-full
|
|
50
59
|
}
|
|
51
60
|
}
|
|
52
61
|
}
|
package/src/text/Description.tsx
CHANGED
|
@@ -16,16 +16,16 @@ export const Description = (props: DescriptionProps) => {
|
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
18
|
<>
|
|
19
|
-
<
|
|
19
|
+
<dt className="description__title">{props.term}</dt>
|
|
20
20
|
{props.markdown ? (
|
|
21
|
-
<
|
|
21
|
+
<dd className={dtClasses.join(" ")}>
|
|
22
22
|
<Markdown
|
|
23
23
|
options={{ disableParsingRawHTML: true, ...props.markdownProps }}
|
|
24
24
|
children={props.description}
|
|
25
25
|
/>
|
|
26
|
-
</
|
|
26
|
+
</dd>
|
|
27
27
|
) : (
|
|
28
|
-
<
|
|
28
|
+
<dd className={dtClasses.join(" ")}>{props.description}</dd>
|
|
29
29
|
)}
|
|
30
30
|
</>
|
|
31
31
|
)
|