@bloom-housing/ui-components 12.7.7 → 13.0.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.
- package/dist/__tests__/storyshots.spec.d.ts +0 -1
- package/dist/__tests__/storyshots.spec.js +9 -9
- package/dist/__tests__/storyshots.spec.js.map +1 -1
- package/dist/src/actions/Button.d.ts +2 -2
- package/dist/src/actions/Button.stories.d.ts +71 -21
- package/dist/src/actions/Button.stories.js +54 -38
- package/dist/src/actions/Button.stories.js.map +1 -1
- package/dist/src/actions/ButtonGroup.d.ts +2 -2
- package/dist/src/actions/ButtonGroup.stories.d.ts +7 -11
- package/dist/src/actions/ButtonGroup.stories.js +0 -4
- package/dist/src/actions/ButtonGroup.stories.js.map +1 -1
- package/dist/src/actions/ExpandableContent.d.ts +1 -1
- package/dist/src/actions/ExpandableContent.stories.d.ts +3 -2
- package/dist/src/actions/ExpandableText.d.ts +2 -1
- package/dist/src/actions/ExpandableText.stories.d.ts +7 -6
- package/dist/src/actions/LinkButton.d.ts +2 -1
- package/dist/src/actions/LinkButton.stories.d.ts +9 -8
- package/dist/src/actions/LocalizedLink.d.ts +2 -2
- package/dist/src/actions/Video.d.ts +2 -1
- package/dist/src/blocks/ActionBlock.d.ts +1 -1
- package/dist/src/blocks/ActionBlock.stories.d.ts +8 -7
- package/dist/src/blocks/Card.d.ts +7 -7
- package/dist/src/blocks/Card.stories.d.ts +5 -9
- package/dist/src/blocks/Card.stories.js +0 -4
- package/dist/src/blocks/Card.stories.js.map +1 -1
- package/dist/src/blocks/DashBlock.d.ts +1 -1
- package/dist/src/blocks/DashBlocks.d.ts +1 -1
- package/dist/src/blocks/DashBlocks.stories.d.ts +2 -1
- package/dist/src/blocks/FormCard.d.ts +1 -1
- package/dist/src/blocks/FormCard.stories.d.ts +3 -2
- package/dist/src/blocks/HousingCounselor.d.ts +2 -1
- package/dist/src/blocks/HousingCounselor.stories.d.ts +4 -3
- package/dist/src/blocks/ImageCard.d.ts +2 -1
- package/dist/src/blocks/ImageCard.js +5 -1
- package/dist/src/blocks/ImageCard.js.map +1 -1
- package/dist/src/blocks/ImageCard.stories.d.ts +18 -22
- package/dist/src/blocks/ImageCard.stories.js +0 -4
- package/dist/src/blocks/ImageCard.stories.js.map +1 -1
- package/dist/src/blocks/InfoCard.d.ts +1 -1
- package/dist/src/blocks/InfoCard.stories.d.ts +6 -10
- package/dist/src/blocks/InfoCard.stories.js +0 -4
- package/dist/src/blocks/InfoCard.stories.js.map +1 -1
- package/dist/src/blocks/MediaCard.d.ts +2 -1
- package/dist/src/blocks/MediaCard.stories.d.ts +5 -9
- package/dist/src/blocks/MediaCard.stories.js +0 -4
- package/dist/src/blocks/MediaCard.stories.js.map +1 -1
- package/dist/src/blocks/StandardCard.d.ts +1 -1
- package/dist/src/blocks/StandardCard.stories.d.ts +6 -10
- package/dist/src/blocks/StandardCard.stories.js +0 -4
- package/dist/src/blocks/StandardCard.stories.js.map +1 -1
- package/dist/src/blocks/StatusBar.d.ts +1 -1
- package/dist/src/blocks/StatusBar.stories.d.ts +4 -3
- package/dist/src/blocks/StatusItem.d.ts +2 -1
- package/dist/src/blocks/StatusItem.stories.d.ts +3 -2
- package/dist/src/blocks/Tooltip.d.ts +1 -1
- package/dist/src/blocks/ViewItem.d.ts +1 -1
- package/dist/src/blocks/ViewItem.stories.d.ts +5 -4
- package/dist/src/documentation/Utilities.d.ts +2 -1
- package/dist/src/footers/ExygyFooter.d.ts +2 -1
- package/dist/src/footers/SiteFooter.d.ts +1 -1
- package/dist/src/footers/SiteFooter.stories.d.ts +7 -6
- package/dist/src/forms/DOBField.d.ts +1 -1
- package/dist/src/forms/DOBField.stories.d.ts +3 -2
- package/dist/src/forms/DateField.d.ts +1 -1
- package/dist/src/forms/DateField.stories.d.ts +3 -2
- package/dist/src/forms/Dropzone.d.ts +1 -1
- package/dist/src/forms/Dropzone.stories.d.ts +4 -3
- package/dist/src/forms/Dropzone.stories.js +1 -2
- package/dist/src/forms/Dropzone.stories.js.map +1 -1
- package/dist/src/forms/Field.d.ts +4 -4
- package/dist/src/forms/Field.stories.d.ts +12 -11
- package/dist/src/forms/FieldGroup.d.ts +1 -1
- package/dist/src/forms/FieldGroup.stories.d.ts +6 -5
- package/dist/src/forms/Form.d.ts +1 -1
- package/dist/src/forms/HouseholdMemberForm.d.ts +2 -1
- package/dist/src/forms/HouseholdMemberForm.stories.d.ts +4 -3
- package/dist/src/forms/HouseholdSizeField.d.ts +2 -1
- package/dist/src/forms/HouseholdSizeField.stories.d.ts +3 -2
- package/dist/src/forms/MultiSelectField.d.ts +1 -1
- package/dist/src/forms/MultiSelectField.stories.d.ts +5 -9
- package/dist/src/forms/MultiSelectField.stories.js +0 -4
- package/dist/src/forms/MultiSelectField.stories.js.map +1 -1
- package/dist/src/forms/PhoneField.d.ts +2 -2
- package/dist/src/forms/Select.d.ts +1 -1
- package/dist/src/forms/Textarea.d.ts +1 -1
- package/dist/src/forms/Textarea.stories.d.ts +9 -8
- package/dist/src/forms/TimeField.d.ts +1 -1
- package/dist/src/forms/TimeField.stories.d.ts +4 -3
- package/dist/src/forms/checkbox.stories.d.ts +3 -2
- package/dist/src/forms/checkbox.stories.js.map +1 -1
- package/dist/src/forms/radio.stories.d.ts +3 -2
- package/dist/src/forms/radio.stories.js.map +1 -1
- package/dist/src/headers/HeadingGroup.d.ts +1 -1
- package/dist/src/headers/HeadingGroup.stories.d.ts +3 -7
- package/dist/src/headers/HeadingGroup.stories.js +0 -4
- package/dist/src/headers/HeadingGroup.stories.js.map +1 -1
- package/dist/src/headers/Hero.d.ts +1 -1
- package/dist/src/headers/Hero.stories.d.ts +7 -6
- package/dist/src/headers/PageHeader.d.ts +1 -1
- package/dist/src/headers/PageHeader.stories.d.ts +7 -11
- package/dist/src/headers/PageHeader.stories.js +0 -4
- package/dist/src/headers/PageHeader.stories.js.map +1 -1
- package/dist/src/headers/SiteHeader.d.ts +1 -1
- package/dist/src/headers/SiteHeader.js.map +1 -1
- package/dist/src/headers/SiteHeader.stories.d.ts +20 -19
- package/dist/src/headers/StepHeader.d.ts +2 -1
- package/dist/src/headers/StepHeader.js.map +1 -1
- package/dist/src/headers/StepHeader.stories.d.ts +5 -4
- package/dist/src/headers/StepHeader.stories.js +1 -2
- package/dist/src/headers/StepHeader.stories.js.map +1 -1
- package/dist/src/helpers/MultiLineAddress.d.ts +2 -1
- package/dist/src/helpers/MultiLineAddress.stories.d.ts +6 -5
- package/dist/src/helpers/OneLineAddress.d.ts +2 -1
- package/dist/src/helpers/OneLineAddress.stories.d.ts +6 -5
- package/dist/src/helpers/formOptions.d.ts +2 -1
- package/dist/src/helpers/preferences.d.ts +2 -1
- package/dist/src/helpers/useFallbackImage.d.ts +2 -2
- package/dist/src/icons/FontAwesome.stories.d.ts +5 -4
- package/dist/src/icons/HeaderBadge.d.ts +2 -1
- package/dist/src/icons/HeaderBadge.stories.d.ts +2 -1
- package/dist/src/icons/Icon.d.ts +63 -62
- package/dist/src/icons/Icon.stories.d.ts +61 -60
- package/dist/src/icons/Icons.d.ts +62 -61
- package/dist/src/lists/NumberedList.stories.d.ts +2 -1
- package/dist/src/lists/PreferencesList.d.ts +2 -1
- package/dist/src/lists/PreferencesList.stories.d.ts +3 -2
- package/dist/src/navigation/Breadcrumbs.d.ts +2 -2
- package/dist/src/navigation/Breadcrumbs.stories.d.ts +3 -2
- package/dist/src/navigation/FooterNav.d.ts +1 -1
- package/dist/src/navigation/LanguageNav.d.ts +2 -1
- package/dist/src/navigation/LanguageNav.stories.d.ts +3 -2
- package/dist/src/navigation/LanguageNav.stories.js +2 -3
- package/dist/src/navigation/LanguageNav.stories.js.map +1 -1
- package/dist/src/navigation/ProgressNav.d.ts +2 -1
- package/dist/src/navigation/ProgressNav.stories.d.ts +4 -8
- package/dist/src/navigation/ProgressNav.stories.js +0 -4
- package/dist/src/navigation/ProgressNav.stories.js.map +1 -1
- package/dist/src/navigation/SideNav.d.ts +2 -1
- package/dist/src/navigation/SideNav.stories.d.ts +6 -10
- package/dist/src/navigation/SideNav.stories.js +0 -4
- package/dist/src/navigation/SideNav.stories.js.map +1 -1
- package/dist/src/navigation/TabNav.d.ts +2 -2
- package/dist/src/navigation/TabNav.stories.d.ts +4 -3
- package/dist/src/navigation/Tabs.stories.d.ts +3 -2
- package/dist/src/notifications/AlertBox.d.ts +2 -1
- package/dist/src/notifications/AlertBox.stories.d.ts +15 -19
- package/dist/src/notifications/AlertBox.stories.js +0 -4
- package/dist/src/notifications/AlertBox.stories.js.map +1 -1
- package/dist/src/notifications/AlertNotice.d.ts +2 -1
- package/dist/src/notifications/AlertNotice.stories.d.ts +8 -7
- package/dist/src/notifications/ApplicationStatus.d.ts +2 -1
- package/dist/src/notifications/ApplicationStatus.stories.d.ts +17 -16
- package/dist/src/notifications/ApplicationStatus.stories.js +3 -4
- package/dist/src/notifications/ApplicationStatus.stories.js.map +1 -1
- package/dist/src/notifications/ErrorMessage.d.ts +1 -1
- package/dist/src/notifications/SiteAlert.d.ts +2 -1
- package/dist/src/notifications/StatusAside.d.ts +1 -1
- package/dist/src/notifications/StatusAside.stories.d.ts +4 -3
- package/dist/src/notifications/StatusMessage.d.ts +2 -2
- package/dist/src/notifications/StatusMessage.stories.d.ts +4 -3
- package/dist/src/overlays/Drawer.d.ts +1 -1
- package/dist/src/overlays/Drawer.stories.d.ts +6 -5
- package/dist/src/overlays/LoadingOverlay.d.ts +1 -1
- package/dist/src/overlays/LoadingOverlay.stories.d.ts +3 -2
- package/dist/src/overlays/Modal.d.ts +1 -1
- package/dist/src/overlays/Modal.stories.d.ts +102 -13
- package/dist/src/overlays/Modal.stories.js +119 -76
- package/dist/src/overlays/Modal.stories.js.map +1 -1
- package/dist/src/overlays/Overlay.d.ts +1 -0
- package/dist/src/overlays/Overlay.js +5 -4
- package/dist/src/overlays/Overlay.js.map +1 -1
- package/dist/src/page_components/ApplicationTimeline.d.ts +2 -1
- package/dist/src/page_components/NavigationHeader.d.ts +1 -1
- package/dist/src/page_components/forgot-password/FormForgotPassword.d.ts +2 -1
- package/dist/src/page_components/listing/AdditionalFees.d.ts +1 -1
- package/dist/src/page_components/listing/AdditionalFees.stories.d.ts +10 -9
- package/dist/src/page_components/listing/ContentAccordion.d.ts +1 -1
- package/dist/src/page_components/listing/ContentAccordion.stories.d.ts +7 -6
- package/dist/src/page_components/listing/ListingCard.d.ts +1 -1
- package/dist/src/page_components/listing/ListingCard.stories.d.ts +16 -15
- package/dist/src/page_components/listing/ListingDetailHeader.d.ts +1 -1
- package/dist/src/page_components/listing/ListingDetailHeader.stories.d.ts +2 -1
- package/dist/src/page_components/listing/ListingDetails.d.ts +3 -2
- package/dist/src/page_components/listing/ListingMap.d.ts +2 -1
- package/dist/src/page_components/listing/ListingMap.stories.d.ts +2 -1
- package/dist/src/page_components/listing/ListingsGroup.d.ts +1 -1
- package/dist/src/page_components/listing/ListingsGroup.stories.d.ts +5 -4
- package/dist/src/page_components/listing/listing_sidebar/Contact.d.ts +1 -1
- package/dist/src/page_components/listing/listing_sidebar/Contact.stories.d.ts +6 -5
- package/dist/src/page_components/listing/listing_sidebar/ContactAddress.d.ts +2 -1
- package/dist/src/page_components/listing/listing_sidebar/ContactAddress.stories.d.ts +3 -2
- package/dist/src/page_components/listing/listing_sidebar/ExpandableSection.d.ts +1 -1
- package/dist/src/page_components/listing/listing_sidebar/ExpandableSection.stories.d.ts +4 -3
- package/dist/src/page_components/listing/listing_sidebar/GetApplication.d.ts +2 -1
- package/dist/src/page_components/listing/listing_sidebar/GetApplication.stories.d.ts +10 -9
- package/dist/src/page_components/listing/listing_sidebar/ListingUpdated.d.ts +2 -1
- package/dist/src/page_components/listing/listing_sidebar/NumberedHeader.d.ts +2 -1
- package/dist/src/page_components/listing/listing_sidebar/OrDivider.d.ts +2 -1
- package/dist/src/page_components/listing/listing_sidebar/QuantityRowSection.d.ts +1 -1
- package/dist/src/page_components/listing/listing_sidebar/QuantityRowSection.stories.d.ts +9 -8
- package/dist/src/page_components/listing/listing_sidebar/ReferralApplication.d.ts +2 -1
- package/dist/src/page_components/listing/listing_sidebar/ReferralApplication.stories.d.ts +2 -1
- package/dist/src/page_components/listing/listing_sidebar/SidebarBlock.d.ts +1 -1
- package/dist/src/page_components/listing/listing_sidebar/SidebarBlock.stories.d.ts +4 -3
- package/dist/src/page_components/listing/listing_sidebar/SubmitApplication.d.ts +2 -1
- package/dist/src/page_components/listing/listing_sidebar/SubmitApplication.stories.d.ts +6 -5
- package/dist/src/page_components/listing/listing_sidebar/events/DownloadLotteryResults.d.ts +2 -1
- package/dist/src/page_components/listing/listing_sidebar/events/DownloadLotteryResults.stories.d.ts +3 -2
- package/dist/src/page_components/listing/listing_sidebar/events/EventSection.d.ts +1 -1
- package/dist/src/page_components/listing/listing_sidebar/events/EventSection.stories.d.ts +13 -12
- package/dist/src/page_components/sign-in/FormSignIn.d.ts +2 -1
- package/dist/src/page_components/sign-in/FormSignInAddPhone.d.ts +2 -1
- package/dist/src/page_components/sign-in/FormSignInErrorBox.d.ts +2 -1
- package/dist/src/page_components/sign-in/FormSignInMFACode.d.ts +2 -1
- package/dist/src/page_components/sign-in/FormSignInMFAType.d.ts +2 -1
- package/dist/src/page_components/sign-in/FormTerms.d.ts +2 -1
- package/dist/src/page_components/sign-in/ResendConfirmationModal.d.ts +2 -1
- package/dist/src/prototypes/AppCard.stories.d.ts +4 -3
- package/dist/src/prototypes/Back.stories.d.ts +3 -2
- package/dist/src/prototypes/ButtonGroup.stories.d.ts +4 -3
- package/dist/src/prototypes/ButtonPager.stories.d.ts +3 -2
- package/dist/src/prototypes/FieldSection.d.ts +1 -1
- package/dist/src/prototypes/FieldSection.stories.d.ts +5 -4
- package/dist/src/prototypes/GridItem.d.ts +1 -1
- package/dist/src/prototypes/GridItem.stories.d.ts +4 -3
- package/dist/src/prototypes/SummaryCard.stories.d.ts +4 -3
- package/dist/src/prototypes/Swatch.d.ts +2 -1
- package/dist/src/sections/ContentSection.d.ts +1 -1
- package/dist/src/sections/FooterSection.d.ts +1 -1
- package/dist/src/sections/GridSection.d.ts +2 -2
- package/dist/src/sections/GridSection.stories.d.ts +12 -11
- package/dist/src/sections/InfoCardGrid.d.ts +1 -1
- package/dist/src/sections/InfoCardGrid.stories.d.ts +4 -3
- package/dist/src/sections/ListSection.d.ts +1 -1
- package/dist/src/sections/MarkdownSection.d.ts +1 -1
- package/dist/src/sections/ResponsiveContentList.d.ts +4 -4
- package/dist/src/sections/ResponsiveContentList.stories.d.ts +2 -1
- package/dist/src/sections/ResponsiveWrappers.d.ts +2 -2
- package/dist/src/tables/AgPagination.d.ts +1 -1
- package/dist/src/tables/AgTable.d.ts +1 -1
- package/dist/src/tables/AgTable.stories.d.ts +4 -3
- package/dist/src/tables/CategoryTable.d.ts +2 -1
- package/dist/src/tables/CategoryTable.stories.d.ts +5 -4
- package/dist/src/tables/GroupedTable.d.ts +1 -1
- package/dist/src/tables/GroupedTable.stories.d.ts +3 -2
- package/dist/src/tables/MinimalTable.d.ts +2 -1
- package/dist/src/tables/MinimalTable.stories.d.ts +10 -9
- package/dist/src/tables/StackedTable.d.ts +2 -1
- package/dist/src/tables/StackedTable.stories.d.ts +8 -7
- package/dist/src/tables/StandardTable.d.ts +5 -5
- package/dist/src/tables/StandardTable.stories.d.ts +7 -6
- package/dist/src/text/Description.d.ts +1 -1
- package/dist/src/text/Description.stories.d.ts +4 -3
- package/dist/src/text/Heading.d.ts +1 -1
- package/dist/src/text/Heading.js.map +1 -1
- package/dist/src/text/Heading.stories.d.ts +15 -14
- package/dist/src/text/Message.d.ts +1 -1
- package/dist/src/text/Message.stories.d.ts +4 -3
- package/dist/src/text/Tag.d.ts +1 -1
- package/dist/src/text/Tag.stories.d.ts +11 -10
- package/package.json +33 -33
- package/src/actions/Button.docs.mdx +6 -5
- package/src/actions/Button.stories.tsx +73 -62
- package/src/actions/ButtonGroup.docs.mdx +7 -5
- package/src/actions/ButtonGroup.stories.tsx +0 -4
- package/src/actions/ButtonGroup.tsx +1 -1
- package/src/blocks/Card.docs.mdx +10 -11
- package/src/blocks/Card.stories.tsx +0 -4
- package/src/blocks/ImageCard.docs.mdx +8 -6
- package/src/blocks/ImageCard.stories.tsx +0 -4
- package/src/blocks/ImageCard.tsx +6 -2
- package/src/blocks/InfoCard.docs.mdx +8 -6
- package/src/blocks/InfoCard.stories.tsx +0 -4
- package/src/blocks/MediaCard.docs.mdx +10 -11
- package/src/blocks/MediaCard.stories.tsx +0 -4
- package/src/blocks/StandardCard.docs.mdx +7 -8
- package/src/blocks/StandardCard.stories.tsx +0 -4
- package/src/documentation/{Utilities.stories.mdx → Utilities.docs.mdx} +4 -2
- package/src/forms/Dropzone.stories.tsx +1 -2
- package/src/forms/Field.tsx +3 -3
- package/src/forms/MultiSelectField.docs.mdx +6 -5
- package/src/forms/MultiSelectField.stories.tsx +1 -5
- package/src/forms/PhoneField.tsx +1 -1
- package/src/forms/checkbox.stories.tsx +1 -1
- package/src/forms/radio.stories.tsx +1 -1
- package/src/headers/HeadingGroup.docs.mdx +6 -5
- package/src/headers/HeadingGroup.stories.tsx +0 -4
- package/src/headers/PageHeader.docs.mdx +10 -12
- package/src/headers/PageHeader.stories.tsx +0 -4
- package/src/headers/SiteHeader.tsx +1 -1
- package/src/headers/StepHeader.docs.mdx +14 -13
- package/src/headers/StepHeader.stories.tsx +1 -2
- package/src/headers/StepHeader.tsx +1 -1
- package/src/lists/PreferencesList.docs.mdx +8 -6
- package/src/navigation/LanguageNav.stories.tsx +1 -3
- package/src/navigation/ProgressNav.docs.mdx +13 -8
- package/src/navigation/ProgressNav.stories.tsx +0 -4
- package/src/navigation/SideNav.docs.mdx +7 -5
- package/src/navigation/SideNav.stories.tsx +0 -4
- package/src/notifications/AlertBox.docs.mdx +7 -8
- package/src/notifications/AlertBox.stories.tsx +0 -4
- package/src/notifications/ApplicationStatus.stories.tsx +3 -4
- package/src/overlays/Modal.docs.mdx +7 -5
- package/src/overlays/Modal.stories.tsx +273 -232
- package/src/overlays/Overlay.tsx +8 -2
- package/src/page_components/listing/ListingCard.docs.mdx +9 -9
- package/src/text/Heading.docs.mdx +7 -5
- package/src/text/Heading.tsx +1 -1
- package/src/text/Tag.docs.mdx +10 -14
package/src/overlays/Overlay.tsx
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useState, useEffect } from "react"
|
|
1
|
+
import React, { useRef, useState, useEffect } from "react"
|
|
2
2
|
import "./Overlay.scss"
|
|
3
3
|
import useKeyPress from "../helpers/useKeyPress"
|
|
4
4
|
import { createPortal } from "react-dom"
|
|
@@ -18,6 +18,7 @@ export type OverlayProps = {
|
|
|
18
18
|
slim?: boolean
|
|
19
19
|
role?: string
|
|
20
20
|
scrollable?: boolean
|
|
21
|
+
nodeRef?: React.MutableRefObject<null>
|
|
21
22
|
}
|
|
22
23
|
|
|
23
24
|
const OverlayInner = (props: OverlayProps) => {
|
|
@@ -33,6 +34,7 @@ const OverlayInner = (props: OverlayProps) => {
|
|
|
33
34
|
|
|
34
35
|
return (
|
|
35
36
|
<div
|
|
37
|
+
ref={props.nodeRef}
|
|
36
38
|
className={classNames.join(" ")}
|
|
37
39
|
role={props.role}
|
|
38
40
|
aria-labelledby={props.ariaLabelledBy}
|
|
@@ -53,6 +55,7 @@ const OverlayInner = (props: OverlayProps) => {
|
|
|
53
55
|
}
|
|
54
56
|
|
|
55
57
|
export const Overlay = (props: OverlayProps): any => {
|
|
58
|
+
const nodeRef = useRef(null)
|
|
56
59
|
const documentAvailable = typeof document !== "undefined"
|
|
57
60
|
const overlayRoot = useState<Element | null>(
|
|
58
61
|
documentAvailable ? document.querySelector("#__next") : null
|
|
@@ -76,6 +79,7 @@ export const Overlay = (props: OverlayProps): any => {
|
|
|
76
79
|
elForPortal &&
|
|
77
80
|
createPortal(
|
|
78
81
|
<CSSTransition
|
|
82
|
+
nodeRef={nodeRef}
|
|
79
83
|
in={props.open}
|
|
80
84
|
timeout={250}
|
|
81
85
|
classNames="overlay-effect"
|
|
@@ -83,7 +87,9 @@ export const Overlay = (props: OverlayProps): any => {
|
|
|
83
87
|
unmountOnExit
|
|
84
88
|
>
|
|
85
89
|
<RemoveScroll>
|
|
86
|
-
<OverlayInner {
|
|
90
|
+
<OverlayInner nodeRef={nodeRef} {...props}>
|
|
91
|
+
{props.children}
|
|
92
|
+
</OverlayInner>
|
|
87
93
|
</RemoveScroll>
|
|
88
94
|
</CSSTransition>,
|
|
89
95
|
elForPortal
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { ListingCard } from "./ListingCard"
|
|
3
|
+
import * as ListingCardStories from './ListingCard.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={ListingCardStories} />
|
|
3
6
|
|
|
4
7
|
# ListingCard
|
|
5
8
|
|
|
6
9
|
The listing card component renders an image with optional status bars below it, and a content section associated with the image which can include titles, a table, and custom content.
|
|
7
10
|
|
|
8
|
-
<Canvas
|
|
9
|
-
<Story id="page-components-listing-card--with-tags-and-headers" />
|
|
10
|
-
</Canvas>
|
|
11
|
+
<Canvas of={ListingCardStories.WithTagsAndHeaders} />
|
|
11
12
|
|
|
12
13
|
<br />
|
|
14
|
+
|
|
13
15
|
<br />
|
|
14
16
|
|
|
15
17
|
## Variants
|
|
@@ -20,15 +22,13 @@ Many of the display variations of the card are enabled by the interior content p
|
|
|
20
22
|
|
|
21
23
|
By setting `stackedTable` to true, the interior table component switches from `StandardTable` to `StackedTable` for a different UI presentation.
|
|
22
24
|
|
|
23
|
-
<Canvas
|
|
24
|
-
<Story id="page-components-listing-card--with-stacked-table" />
|
|
25
|
-
</Canvas>
|
|
25
|
+
<Canvas of={ListingCardStories.withStackedTable} />
|
|
26
26
|
|
|
27
27
|
## Component Properties
|
|
28
28
|
|
|
29
|
-
<
|
|
29
|
+
<ArgTypes of={ListingCard} />
|
|
30
30
|
|
|
31
|
-
**Note:** for
|
|
31
|
+
**Note:** for accessibility reasons, if you have a link that should apply to the card as a whole, pass an `href` prop to the `contentHeader` key of `contentProps`. (If you previously passed `href` to `imageCardProps`, you should remove that.) You'll also want to pass `ariaHidden: true` as a prop for the footer button.
|
|
32
32
|
|
|
33
33
|
## Theming Variables
|
|
34
34
|
|
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { Swatch } from "../prototypes/Swatch"
|
|
3
3
|
import { Heading } from "./Heading"
|
|
4
|
+
import * as HeadingStories from './Heading.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={HeadingStories} />
|
|
4
7
|
|
|
5
8
|
# Heading
|
|
6
9
|
|
|
7
10
|
The heading component renders an HTML heading with a flexible priority and style. Each style available maps to a [Typography](?path=/story/theming-typography--page) variant.
|
|
8
11
|
|
|
9
|
-
<Canvas
|
|
10
|
-
<Story id="text-heading--large-header" />
|
|
11
|
-
</Canvas>
|
|
12
|
+
<Canvas of={HeadingStories.largeHeader} />
|
|
12
13
|
|
|
13
14
|
<br />
|
|
15
|
+
|
|
14
16
|
<br />
|
|
15
17
|
|
|
16
18
|
## Component Properties
|
|
17
19
|
|
|
18
|
-
<
|
|
20
|
+
<ArgTypes of={Heading} />
|
package/src/text/Heading.tsx
CHANGED
|
@@ -21,7 +21,7 @@ const HeaderStyleMap = {
|
|
|
21
21
|
|
|
22
22
|
const Heading = (props: HeadingProps) => {
|
|
23
23
|
const priority = props.priority && props.priority >= 1 && props.priority <= 6 ? props.priority : 1
|
|
24
|
-
const Tag = `h${priority}` as keyof JSX.IntrinsicElements
|
|
24
|
+
const Tag = `h${priority}` as keyof React.JSX.IntrinsicElements
|
|
25
25
|
const classNames = []
|
|
26
26
|
if (props.styleType) classNames.push(HeaderStyleMap[props.styleType])
|
|
27
27
|
if (props.className) classNames.push(props.className)
|
package/src/text/Tag.docs.mdx
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { Tag } from "./Tag"
|
|
3
|
+
import * as TagStories from './Tag.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={TagStories} />
|
|
3
6
|
|
|
4
7
|
# Tag
|
|
5
8
|
|
|
6
9
|
The tag component offers a simple way to present a content label or status indicator.
|
|
7
10
|
|
|
8
|
-
<Canvas
|
|
9
|
-
<Story id="text-tag--pill-colors" />
|
|
10
|
-
</Canvas>
|
|
11
|
+
<Canvas of={TagStories.pillColors} />
|
|
11
12
|
|
|
12
13
|
<br />
|
|
14
|
+
|
|
13
15
|
<br />
|
|
14
16
|
|
|
15
17
|
## Variants
|
|
@@ -20,29 +22,23 @@ There are several props which accept enums to adjust style type and size. For ex
|
|
|
20
22
|
|
|
21
23
|
(Default, no prop required.)
|
|
22
24
|
|
|
23
|
-
<Canvas
|
|
24
|
-
<Story id="text-tag--standard" />
|
|
25
|
-
</Canvas>
|
|
25
|
+
<Canvas of={TagStories.standard} />
|
|
26
26
|
|
|
27
27
|
### Pill
|
|
28
28
|
|
|
29
29
|
Set the `pillStyle` property to `true`.
|
|
30
30
|
|
|
31
|
-
<Canvas
|
|
32
|
-
<Story id="text-tag--pill" />
|
|
33
|
-
</Canvas>
|
|
31
|
+
<Canvas of={TagStories.pill} />
|
|
34
32
|
|
|
35
33
|
### Fill Container
|
|
36
34
|
|
|
37
35
|
Set the `fillContainer` property to `true` for a block tag which spans the entire width of its container.
|
|
38
36
|
|
|
39
|
-
<Canvas
|
|
40
|
-
<Story id="text-tag--pill-listings" />
|
|
41
|
-
</Canvas>
|
|
37
|
+
<Canvas of={TagStories.pillListings} />
|
|
42
38
|
|
|
43
39
|
## Component Properties
|
|
44
40
|
|
|
45
|
-
<
|
|
41
|
+
<ArgTypes of={Tag} />
|
|
46
42
|
|
|
47
43
|
## Theming Variables
|
|
48
44
|
|