@bloom-housing/ui-components 12.4.0 → 12.5.0

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.
@@ -27,6 +27,8 @@ export interface ContactProps {
27
27
  contactTitleClassname?: string;
28
28
  /** The text for the section's header */
29
29
  sectionTitle: string;
30
+ /** The header level for the sectionTitle */
31
+ priority?: number;
30
32
  strings: {
31
33
  email?: string;
32
34
  getDirections: string;
@@ -34,5 +36,5 @@ export interface ContactProps {
34
36
  };
35
37
  }
36
38
  /** Displays information about a contact, including their address, contact information, and notes */
37
- declare const Contact: ({ additionalInformation, contactAddress, contactCompany, contactEmail, contactName, contactPhoneNumber, contactPhoneNumberNote, contactTitle, contactTitleClassname, sectionTitle, strings, }: ContactProps) => JSX.Element;
39
+ declare const Contact: ({ additionalInformation, contactAddress, contactCompany, contactEmail, contactName, contactPhoneNumber, contactPhoneNumberNote, contactTitle, contactTitleClassname, sectionTitle, priority, strings, }: ContactProps) => JSX.Element;
38
40
  export { Contact as default, Contact };
@@ -4,7 +4,7 @@ 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, contactTitleClassname = _a.contactTitleClassname, 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, priority = _a.priority, strings = _a.strings;
8
8
  var formattedPhoneLink = contactPhoneNumber
9
9
  ? "tel:".concat(contactPhoneNumber.replace(/[-()]/g, ""))
10
10
  : undefined;
@@ -15,7 +15,7 @@ var Contact = function (_a) {
15
15
  if (contactTitleClassname)
16
16
  contactTitleClasses.push(contactTitleClassname);
17
17
  return (React.createElement("section", { className: "aside-block" },
18
- React.createElement(Heading, { priority: 4, styleType: "underlineWeighted" }, sectionTitle),
18
+ React.createElement(Heading, { priority: priority !== null && priority !== void 0 ? priority : 4, styleType: "underlineWeighted" }, sectionTitle),
19
19
  contactName && React.createElement("p", { className: "text-xl" }, contactName),
20
20
  contactTitle && React.createElement("p", { className: contactTitleClasses.join(" ") }, contactTitle),
21
21
  (contactCompany === null || contactCompany === void 0 ? void 0 : contactCompany.name) && React.createElement("p", { className: "text-gray-700" }, contactCompany.name),
@@ -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;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;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AAI,EAAE,uBAAuB,EAAE,MAAM,EAAC,QAAQ,EAAC,GAAG,EAAC,qBAAqB;gBACzE,oBAAC,IAAI,IAAC,MAAM,EAAC,OAAO,EAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAE,cAAc,CAAC,OAAO,EAAE,SAAS,EAAE,MAAM,GAAI;gBACrF,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,MAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAA,CACnC,CACF,CACL;QAEA,cAAc,IAAI,CACjB,oBAAC,cAAc,IAAC,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,CAAC,aAAa,GAAI,CAC9E,EAEA,qBAAqB,aAArB,qBAAqB;QAArB,qBAAqB,CAAE,GAAG,CAAC,UAAC,IAAI;YAC/B,OAAO,CACL,6BAAK,GAAG,EAAE,IAAI,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM;gBACrC,oBAAC,OAAO,IAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,cAAc,IAC5C,IAAI,CAAC,KAAK,CACH;gBACV,6BAAK,SAAS,EAAC,gCAAgC,IAAE,IAAI,CAAC,OAAO,CAAO,CAChE,CACP,CAAA;QACH,CAAC,CAAC,CACM,CACX,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,OAAO,EAAE,CAAA"}
@@ -1,6 +1,6 @@
1
1
  declare const _default: {
2
2
  title: string;
3
- component: ({ additionalInformation, contactAddress, contactCompany, contactEmail, contactName, contactPhoneNumber, contactPhoneNumberNote, contactTitle, contactTitleClassname, sectionTitle, strings, }: import("./Contact").ContactProps) => JSX.Element;
3
+ component: ({ additionalInformation, contactAddress, contactCompany, contactEmail, contactName, contactPhoneNumber, contactPhoneNumberNote, contactTitle, contactTitleClassname, sectionTitle, priority, strings, }: import("./Contact").ContactProps) => JSX.Element;
4
4
  };
5
5
  export default _default;
6
6
  export declare const NoAddress: () => JSX.Element;
@@ -2,6 +2,7 @@ import * as React from "react";
2
2
  export interface ExpandableSectionProps {
3
3
  content: string | React.ReactNode;
4
4
  expandableContent?: string | React.ReactNode;
5
+ priority?: number;
5
6
  strings: {
6
7
  title: string;
7
8
  readMore?: string;
@@ -9,5 +10,5 @@ export interface ExpandableSectionProps {
9
10
  buttonAriaLabel?: string;
10
11
  };
11
12
  }
12
- declare const ExpandableSection: ({ content, expandableContent, strings }: ExpandableSectionProps) => JSX.Element | null;
13
+ declare const ExpandableSection: ({ content, expandableContent, priority, strings, }: ExpandableSectionProps) => JSX.Element | null;
13
14
  export { ExpandableSection as default, ExpandableSection };
@@ -3,14 +3,14 @@ import Markdown from "markdown-to-jsx";
3
3
  import { ExpandableContent } from "../../../actions/ExpandableContent";
4
4
  import { Heading } from "../../../text/Heading";
5
5
  var ExpandableSection = function (_a) {
6
- var content = _a.content, expandableContent = _a.expandableContent, strings = _a.strings;
6
+ var content = _a.content, expandableContent = _a.expandableContent, priority = _a.priority, strings = _a.strings;
7
7
  if (!content)
8
8
  return null;
9
9
  var getTextContent = function (textContent) {
10
10
  return (React.createElement(React.Fragment, null, typeof textContent === "string" ? (React.createElement(Markdown, { options: { disableParsingRawHTML: false } }, textContent)) : (textContent)));
11
11
  };
12
12
  return (React.createElement("section", { className: "aside-block" },
13
- React.createElement(Heading, { priority: 4, styleType: "underlineWeighted" }, strings.title),
13
+ React.createElement(Heading, { priority: priority !== null && priority !== void 0 ? priority : 4, styleType: "underlineWeighted" }, strings.title),
14
14
  React.createElement("div", { className: "text-sm text-gray-750" },
15
15
  getTextContent(content),
16
16
  expandableContent && (React.createElement("div", { className: "mt-2" },
@@ -1 +1 @@
1
- {"version":3,"file":"ExpandableSection.js","sourceRoot":"","sources":["../../../../../src/page_components/listing/listing_sidebar/ExpandableSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,QAAQ,MAAM,iBAAiB,CAAA;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAA;AACtE,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAa/C,IAAM,iBAAiB,GAAG,UAAC,EAA+D;QAA7D,OAAO,aAAA,EAAE,iBAAiB,uBAAA,EAAE,OAAO,aAAA;IAC9D,IAAI,CAAC,OAAO;QAAE,OAAO,IAAI,CAAA;IAEzB,IAAM,cAAc,GAAG,UAAC,WAAqC;QAC3D,OAAO,CACL,0CACG,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,CACjC,oBAAC,QAAQ,IAAC,OAAO,EAAE,EAAE,qBAAqB,EAAE,KAAK,EAAE,IAAG,WAAW,CAAY,CAC9E,CAAC,CAAC,CAAC,CACF,WAAW,CACZ,CACA,CACJ,CAAA;IACH,CAAC,CAAA;IACD,OAAO,CACL,iCAAS,SAAS,EAAC,aAAa;QAC9B,oBAAC,OAAO,IAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAE,mBAAmB,IACjD,OAAO,CAAC,KAAK,CACN;QACV,6BAAK,SAAS,EAAC,uBAAuB;YACnC,cAAc,CAAC,OAAO,CAAC;YACvB,iBAAiB,IAAI,CACpB,6BAAK,SAAS,EAAE,MAAM;gBACpB,oBAAC,iBAAiB,IAChB,OAAO,EAAE;wBACP,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,eAAe,EAAE,OAAO,CAAC,eAAe;qBACzC,IAEA,cAAc,CAAC,iBAAiB,CAAC,CAChB,CAChB,CACP,CACG,CACE,CACX,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,iBAAiB,EAAE,CAAA"}
1
+ {"version":3,"file":"ExpandableSection.js","sourceRoot":"","sources":["../../../../../src/page_components/listing/listing_sidebar/ExpandableSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,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declare const _default: {
2
2
  title: string;
3
- component: ({ content, expandableContent, strings }: import("./ExpandableSection").ExpandableSectionProps) => JSX.Element | null;
3
+ component: ({ content, expandableContent, priority, strings, }: import("./ExpandableSection").ExpandableSectionProps) => JSX.Element | null;
4
4
  };
5
5
  export default _default;
6
6
  export declare const Default: () => JSX.Element;
@@ -11,6 +11,7 @@ type EventSectionProps = {
11
11
  headerText?: string;
12
12
  sectionHeader?: boolean;
13
13
  dateClassName?: string;
14
+ priority?: number;
14
15
  };
15
16
  declare const EventSection: (props: EventSectionProps) => JSX.Element | null;
16
17
  export { EventSection as default, EventSection };
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
2
  import { Heading } from "../../../../text/Heading";
3
3
  var EventSection = function (props) {
4
+ var _a;
4
5
  if (!props.events.length)
5
6
  return null;
6
7
  var dateClasses = ["inline-block text-sm uppercase"];
@@ -8,7 +9,7 @@ var EventSection = function (props) {
8
9
  dateClasses.push(props.dateClassName);
9
10
  }
10
11
  return (React.createElement("section", { className: "aside-block" },
11
- props.headerText && (React.createElement(Heading, { priority: 4, styleType: props.sectionHeader ? "underlineWeighted" : "capsWeighted" }, props.headerText)),
12
+ props.headerText && (React.createElement(Heading, { priority: (_a = props.priority) !== null && _a !== void 0 ? _a : 4, styleType: props.sectionHeader ? "underlineWeighted" : "capsWeighted" }, props.headerText)),
12
13
  props.events.map(function (event, index) { return (React.createElement("div", { key: "events-".concat(index), className: "".concat(index !== props.events.length - 1 && "pb-3") },
13
14
  event.dateString && (React.createElement("p", { className: "text text-gray-800 pb-2 flex justify-between items-center" },
14
15
  React.createElement("span", { className: dateClasses.join(" ") }, event.dateString),
@@ -1 +1 @@
1
- {"version":3,"file":"EventSection.js","sourceRoot":"","sources":["../../../../../../src/page_components/listing/listing_sidebar/events/EventSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAiBlD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,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAE,IACnF,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,+BAAI,KAAK,CAAC,IAAI,CAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAC9D,CACP,CACG,CACP,EAvBmC,CAuBnC,CAAC,CACM,CACX,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,YAAY,IAAI,OAAO,EAAE,YAAY,EAAE,CAAA"}
1
+ {"version":3,"file":"EventSection.js","sourceRoot":"","sources":["../../../../../../src/page_components/listing/listing_sidebar/events/EventSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAkBlD,IAAM,YAAY,GAAG,UAAC,KAAwB;;IAC5C,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM;QAAE,OAAO,IAAI,CAAA;IAErC,IAAM,WAAW,GAAG,CAAC,gCAAgC,CAAC,CAAA;IAEtD,IAAI,KAAK,CAAC,aAAa,EAAE;QACvB,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAA;KACtC;IAED,OAAO,CACL,iCAAS,SAAS,EAAC,aAAa;QAC7B,KAAK,CAAC,UAAU,IAAI,CACnB,oBAAC,OAAO,IACN,QAAQ,EAAE,MAAA,KAAK,CAAC,QAAQ,mCAAI,CAAC,EAC7B,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,cAAc,IAEpE,KAAK,CAAC,UAAU,CACT,CACX;QACA,KAAK,CAAC,MAAM,CAAC,GAAG,CAAC,UAAC,KAAK,EAAE,KAAK,IAAK,OAAA,CAClC,6BAAK,GAAG,EAAE,iBAAU,KAAK,CAAE,EAAE,SAAS,EAAE,UAAG,KAAK,KAAK,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAE;YACrF,KAAK,CAAC,UAAU,IAAI,CACnB,2BAAG,SAAS,EAAC,2DAA2D;gBACtE,8BAAM,SAAS,EAAE,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,IAAG,KAAK,CAAC,UAAU,CAAQ;gBAChE,KAAK,CAAC,UAAU,IAAI,CACnB,8BAAM,SAAS,EAAC,mDAAmD,IAChE,KAAK,CAAC,UAAU,CACZ,CACR,CACC,CACL;YACA,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,QAAQ,IAAI,CAClC,2BAAG,SAAS,EAAC,cAAc;gBACzB,2BAAG,IAAI,EAAE,KAAK,CAAC,OAAO,IAAG,KAAK,CAAC,QAAQ,CAAK,CAC1C,CACL;YACA,KAAK,CAAC,IAAI,IAAI,CACb,6BAAK,SAAS,EAAE,gCAAyB,KAAK,KAAK,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,IAAI,MAAM,CAAE,IACnF,OAAO,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,+BAAI,KAAK,CAAC,IAAI,CAAK,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAC9D,CACP,CACG,CACP,EAvBmC,CAuBnC,CAAC,CACM,CACX,CAAA;AACH,CAAC,CAAA;AAED,OAAO,EAAE,YAAY,IAAI,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -3,8 +3,9 @@ export interface ResponsiveContentProps {
3
3
  children: React.ReactNode;
4
4
  desktopClass?: string;
5
5
  }
6
+ declare const resetAccordionUuid: () => void;
6
7
  declare const ResponsiveContentList: (props: ResponsiveContentProps) => JSX.Element;
7
8
  declare const ResponsiveContentItem: (props: ResponsiveContentProps) => JSX.Element;
8
9
  declare const ResponsiveContentItemHeader: (props: ResponsiveContentProps) => JSX.Element;
9
10
  declare const ResponsiveContentItemBody: (props: ResponsiveContentProps) => JSX.Element;
10
- export { ResponsiveContentList, ResponsiveContentItem, ResponsiveContentItemHeader, ResponsiveContentItemBody, };
11
+ export { ResponsiveContentList, ResponsiveContentItem, ResponsiveContentItemHeader, ResponsiveContentItemBody, resetAccordionUuid, };
@@ -1,6 +1,9 @@
1
1
  import * as React from "react";
2
2
  import { Desktop, Mobile } from "./ResponsiveWrappers";
3
- import { Accordion, AccordionItem, AccordionItemHeading, AccordionItemButton, AccordionItemPanel, } from "react-accessible-accordion";
3
+ import { Accordion, AccordionItem, AccordionItemHeading, AccordionItemButton, AccordionItemPanel, resetNextUuid, } from "react-accessible-accordion";
4
+ var resetAccordionUuid = function () {
5
+ resetNextUuid();
6
+ };
4
7
  var ResponsiveContentList = function (props) { return (React.createElement(React.Fragment, null,
5
8
  React.createElement(Mobile, null,
6
9
  React.createElement(Accordion, { allowZeroExpanded: true, allowMultipleExpanded: true }, props.children)),
@@ -20,5 +23,5 @@ var ResponsiveContentItemBody = function (props) { return (React.createElement(R
20
23
  React.createElement(Mobile, null,
21
24
  React.createElement(AccordionItemPanel, null, props.children)),
22
25
  React.createElement(Desktop, null, props.children))); };
23
- export { ResponsiveContentList, ResponsiveContentItem, ResponsiveContentItemHeader, ResponsiveContentItemBody, };
26
+ export { ResponsiveContentList, ResponsiveContentItem, ResponsiveContentItemHeader, ResponsiveContentItemBody, resetAccordionUuid, };
24
27
  //# sourceMappingURL=ResponsiveContentList.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResponsiveContentList.js","sourceRoot":"","sources":["../../../src/sections/ResponsiveContentList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EACL,SAAS,EACT,aAAa,EACb,oBAAoB,EACpB,mBAAmB,EACnB,kBAAkB,GACnB,MAAM,4BAA4B,CAAA;AAOnC,IAAM,qBAAqB,GAAG,UAAC,KAA6B,IAAK,OAAA,CAC/D;IACE,oBAAC,MAAM;QACL,oBAAC,SAAS,IAAC,iBAAiB,QAAC,qBAAqB,UAC/C,KAAK,CAAC,QAAQ,CACL,CACL;IACT,oBAAC,OAAO;QACN,4BAAI,SAAS,EAAC,yBAAyB,IAAE,KAAK,CAAC,QAAQ,CAAM,CACrD,CACT,CACJ,EAXgE,CAWhE,CAAA;AAED,IAAM,qBAAqB,GAAG,UAAC,KAA6B,IAAK,OAAA,CAC/D;IACE,oBAAC,MAAM;QACL,oBAAC,aAAa,QAAE,KAAK,CAAC,QAAQ,CAAiB,CACxC;IACT,oBAAC,OAAO;QACN,4BAAI,SAAS,EAAE,0BAA0B,GAAG,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,IACvF,KAAK,CAAC,QAAQ,CACZ,CACG,CACT,CACJ,EAXgE,CAWhE,CAAA;AAED,IAAM,2BAA2B,GAAG,UAAC,KAA6B,IAAK,OAAA,CACrE;IACE,oBAAC,MAAM;QACL,oBAAC,oBAAoB,kBAAa,CAAC;YACjC,oBAAC,mBAAmB,QAAE,KAAK,CAAC,QAAQ,CAAuB,CACtC,CAChB;IACT,oBAAC,OAAO,QAAE,KAAK,CAAC,QAAQ,CAAW,CAClC,CACJ,EATsE,CAStE,CAAA;AAED,IAAM,yBAAyB,GAAG,UAAC,KAA6B,IAAK,OAAA,CACnE;IACE,oBAAC,MAAM;QACL,oBAAC,kBAAkB,QAAE,KAAK,CAAC,QAAQ,CAAsB,CAClD;IACT,oBAAC,OAAO,QAAE,KAAK,CAAC,QAAQ,CAAW,CAClC,CACJ,EAPoE,CAOpE,CAAA;AAED,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,GAC1B,CAAA"}
1
+ {"version":3,"file":"ResponsiveContentList.js","sourceRoot":"","sources":["../../../src/sections/ResponsiveContentList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,O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AQ,CAAsB,CAClD;IACT,oBAAC,OAAO,QAAE,KAAK,CAAC,QAAQ,CAAW,CAClC,CACJ,EAPoE,CAOpE,CAAA;AAED,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,kBAAkB,GACnB,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bloom-housing/ui-components",
3
- "version": "12.4.0",
3
+ "version": "12.5.0",
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",
@@ -25,6 +25,8 @@ export interface ContactProps {
25
25
  contactTitleClassname?: string
26
26
  /** The text for the section's header */
27
27
  sectionTitle: string
28
+ /** The header level for the sectionTitle */
29
+ priority?: number
28
30
  strings: { email?: string; getDirections: string; website?: string }
29
31
  }
30
32
 
@@ -40,6 +42,7 @@ const Contact = ({
40
42
  contactTitle,
41
43
  contactTitleClassname,
42
44
  sectionTitle,
45
+ priority,
43
46
  strings,
44
47
  }: ContactProps) => {
45
48
  const formattedPhoneLink = contactPhoneNumber
@@ -54,7 +57,7 @@ const Contact = ({
54
57
 
55
58
  return (
56
59
  <section className="aside-block">
57
- <Heading priority={4} styleType={"underlineWeighted"}>
60
+ <Heading priority={priority ?? 4} styleType={"underlineWeighted"}>
58
61
  {sectionTitle}
59
62
  </Heading>
60
63
 
@@ -6,6 +6,7 @@ import { Heading } from "../../../text/Heading"
6
6
  export interface ExpandableSectionProps {
7
7
  content: string | React.ReactNode
8
8
  expandableContent?: string | React.ReactNode
9
+ priority?: number
9
10
  strings: {
10
11
  title: string
11
12
  readMore?: string
@@ -14,7 +15,12 @@ export interface ExpandableSectionProps {
14
15
  }
15
16
  }
16
17
 
17
- const ExpandableSection = ({ content, expandableContent, strings }: ExpandableSectionProps) => {
18
+ const ExpandableSection = ({
19
+ content,
20
+ expandableContent,
21
+ priority,
22
+ strings,
23
+ }: ExpandableSectionProps) => {
18
24
  if (!content) return null
19
25
 
20
26
  const getTextContent = (textContent: string | React.ReactNode) => {
@@ -30,7 +36,7 @@ const ExpandableSection = ({ content, expandableContent, strings }: ExpandableSe
30
36
  }
31
37
  return (
32
38
  <section className="aside-block">
33
- <Heading priority={4} styleType={"underlineWeighted"}>
39
+ <Heading priority={priority ?? 4} styleType={"underlineWeighted"}>
34
40
  {strings.title}
35
41
  </Heading>
36
42
  <div className="text-sm text-gray-750">
@@ -14,6 +14,7 @@ type EventSectionProps = {
14
14
  headerText?: string
15
15
  sectionHeader?: boolean
16
16
  dateClassName?: string
17
+ priority?: number
17
18
  }
18
19
 
19
20
  const EventSection = (props: EventSectionProps) => {
@@ -29,7 +30,7 @@ const EventSection = (props: EventSectionProps) => {
29
30
  <section className="aside-block">
30
31
  {props.headerText && (
31
32
  <Heading
32
- priority={4}
33
+ priority={props.priority ?? 4}
33
34
  styleType={props.sectionHeader ? "underlineWeighted" : "capsWeighted"}
34
35
  >
35
36
  {props.headerText}
@@ -6,6 +6,7 @@ import {
6
6
  AccordionItemHeading,
7
7
  AccordionItemButton,
8
8
  AccordionItemPanel,
9
+ resetNextUuid,
9
10
  } from "react-accessible-accordion"
10
11
 
11
12
  export interface ResponsiveContentProps {
@@ -13,6 +14,10 @@ export interface ResponsiveContentProps {
13
14
  desktopClass?: string
14
15
  }
15
16
 
17
+ const resetAccordionUuid = () => {
18
+ resetNextUuid()
19
+ }
20
+
16
21
  const ResponsiveContentList = (props: ResponsiveContentProps) => (
17
22
  <>
18
23
  <Mobile>
@@ -64,4 +69,5 @@ export {
64
69
  ResponsiveContentItem,
65
70
  ResponsiveContentItemHeader,
66
71
  ResponsiveContentItemBody,
72
+ resetAccordionUuid,
67
73
  }