@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
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { StandardCard } from "./StandardCard"
|
|
3
|
+
import * as StandardCardStories from './StandardCard.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={StandardCardStories} />
|
|
3
6
|
|
|
4
7
|
# Standard Card
|
|
5
8
|
|
|
6
9
|
The standard card component displays a title with a child element (e.g table) and optional footer.
|
|
7
10
|
|
|
8
|
-
<Canvas
|
|
9
|
-
<Story id="blocks-standard-card" />
|
|
10
|
-
</Canvas>
|
|
11
|
+
<Canvas of={StandardCardStories.Blank} />
|
|
11
12
|
|
|
12
13
|
## Component Properties
|
|
13
14
|
|
|
14
|
-
<
|
|
15
|
+
<ArgTypes of={StandardCard} />
|
|
15
16
|
|
|
16
17
|
## Theming Variables
|
|
17
18
|
|
|
18
|
-
<Canvas
|
|
19
|
-
<Story id="blocks-standard-card--style-overrides" />
|
|
20
|
-
</Canvas>
|
|
19
|
+
<Canvas of={StandardCardStories.styleOverrides} />
|
|
21
20
|
|
|
22
21
|
You can apply CSS variables to the `.standard-card` selector to customize the appearance of the component.
|
|
23
22
|
|
|
@@ -6,7 +6,6 @@ import { MinimalTable } from "../tables/MinimalTable"
|
|
|
6
6
|
import { mockDataWithStyling, mockHeadersWithStyling } from "../tables/MinimalTable.stories"
|
|
7
7
|
|
|
8
8
|
import { Button } from "../actions/Button"
|
|
9
|
-
import StandardCardDocumentation from "./StandardCard.docs.mdx"
|
|
10
9
|
|
|
11
10
|
export default {
|
|
12
11
|
title: "Blocks/StandardCard 🚩",
|
|
@@ -14,9 +13,6 @@ export default {
|
|
|
14
13
|
decorators: [(storyFn: any) => <div style={{ padding: "1rem" }}>{storyFn()}</div>],
|
|
15
14
|
component: StandardCard,
|
|
16
15
|
parameters: {
|
|
17
|
-
docs: {
|
|
18
|
-
page: StandardCardDocumentation,
|
|
19
|
-
},
|
|
20
16
|
badges: [BADGES.GEN2],
|
|
21
17
|
},
|
|
22
18
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Meta, DocsContainer, Unstyled } from "@storybook/addon-docs"
|
|
2
2
|
import { LargeHeader, LargeHeaderSource, Typography } from "./Utilities"
|
|
3
3
|
|
|
4
4
|
<Meta
|
|
@@ -22,4 +22,6 @@ These styles are component agnostic and can be used to ensure UI consistency acr
|
|
|
22
22
|
|
|
23
23
|
These classes can be added to any text element in order to give it visual identity and hierarchy.
|
|
24
24
|
|
|
25
|
-
<
|
|
25
|
+
<Unstyled>
|
|
26
|
+
<Typography />
|
|
27
|
+
</Unstyled>
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
|
-
import { withKnobs } from "@storybook/addon-knobs"
|
|
3
2
|
import { Dropzone } from "./Dropzone"
|
|
4
3
|
|
|
5
4
|
export default {
|
|
6
5
|
title: "Forms/Dropzone",
|
|
7
|
-
decorators: [(storyFn: any) => <div style={{ padding: "1rem" }}>{storyFn()}</div
|
|
6
|
+
decorators: [(storyFn: any) => <div style={{ padding: "1rem" }}>{storyFn()}</div>],
|
|
8
7
|
}
|
|
9
8
|
|
|
10
9
|
export const defaultDropzone = () => {
|
package/src/forms/Field.tsx
CHANGED
|
@@ -5,7 +5,7 @@ import { httpsRegex, urlRegex } from "../helpers/validators"
|
|
|
5
5
|
|
|
6
6
|
export interface FieldProps {
|
|
7
7
|
error?: boolean
|
|
8
|
-
errorMessage?: string | JSX.Element
|
|
8
|
+
errorMessage?: string | React.JSX.Element
|
|
9
9
|
className?: string
|
|
10
10
|
controlClassName?: string
|
|
11
11
|
caps?: boolean
|
|
@@ -14,7 +14,7 @@ export interface FieldProps {
|
|
|
14
14
|
type?: string
|
|
15
15
|
id?: string
|
|
16
16
|
name: string
|
|
17
|
-
note?: string | JSX.Element
|
|
17
|
+
note?: string | React.JSX.Element
|
|
18
18
|
subNote?: string
|
|
19
19
|
label?: string | React.ReactNode
|
|
20
20
|
defaultValue?: string | number
|
|
@@ -35,7 +35,7 @@ export interface FieldProps {
|
|
|
35
35
|
hidden?: boolean
|
|
36
36
|
labelClassName?: string
|
|
37
37
|
bordered?: boolean
|
|
38
|
-
postInputContent?: JSX.Element
|
|
38
|
+
postInputContent?: React.JSX.Element
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
const Field = (props: FieldProps) => {
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { MultiSelectField } from "./MultiSelectField"
|
|
3
|
+
import * as MultiSelectFieldStories from './MultiSelectField.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={MultiSelectFieldStories} />
|
|
3
6
|
|
|
4
7
|
# Multi-Select Field
|
|
5
8
|
|
|
6
9
|
The multi-select field component lets you type to autocomplete and select from a list of options which possibly are lazy-loaded from an API. Selected options show as tags below the text input, and those options can also be removed.
|
|
7
10
|
|
|
8
|
-
<Canvas
|
|
9
|
-
<Story id="forms-multi-select-field--standard" />
|
|
10
|
-
</Canvas>
|
|
11
|
+
<Canvas of={MultiSelectFieldStories.standard} />
|
|
11
12
|
|
|
12
13
|
## Data Source and Default Values
|
|
13
14
|
|
|
@@ -64,7 +65,7 @@ return [
|
|
|
64
65
|
|
|
65
66
|
## Component Properties
|
|
66
67
|
|
|
67
|
-
<
|
|
68
|
+
<ArgTypes of={MultiSelectField} />
|
|
68
69
|
|
|
69
70
|
## Theming Variables
|
|
70
71
|
|
|
@@ -5,20 +5,16 @@ import MultiSelectField, {
|
|
|
5
5
|
MultiSelectFieldItem,
|
|
6
6
|
} from "./MultiSelectField"
|
|
7
7
|
import { useForm } from "react-hook-form"
|
|
8
|
-
import MultiSelectFieldDocumentation from "./MultiSelectField.docs.mdx"
|
|
9
8
|
|
|
10
9
|
export default {
|
|
11
10
|
title: "Forms/MultiSelect Field 🚩",
|
|
12
11
|
id: "forms/multi-select-field",
|
|
13
12
|
decorators: [
|
|
14
|
-
(storyFn: () => JSX.Element) => (
|
|
13
|
+
(storyFn: () => React.JSX.Element) => (
|
|
15
14
|
<div style={{ padding: "30px", maxWidth: "600px" }}>{storyFn()}</div>
|
|
16
15
|
),
|
|
17
16
|
],
|
|
18
17
|
parameters: {
|
|
19
|
-
docs: {
|
|
20
|
-
page: MultiSelectFieldDocumentation,
|
|
21
|
-
},
|
|
22
18
|
badges: [BADGES.GEN2],
|
|
23
19
|
},
|
|
24
20
|
}
|
package/src/forms/PhoneField.tsx
CHANGED
|
@@ -2,7 +2,7 @@ import * as React from "react"
|
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: "Forms/Checkbox",
|
|
5
|
-
decorators: [(storyFn: () => JSX.Element) => <div style={{ padding: "30px" }}>{storyFn()}</div>],
|
|
5
|
+
decorators: [(storyFn: () => React.JSX.Element) => <div style={{ padding: "30px" }}>{storyFn()}</div>],
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export const standard = () => (
|
|
@@ -2,7 +2,7 @@ import * as React from "react"
|
|
|
2
2
|
|
|
3
3
|
export default {
|
|
4
4
|
title: "Forms/Radio",
|
|
5
|
-
decorators: [(storyFn: () => JSX.Element) => <div style={{ padding: "30px" }}>{storyFn()}</div>],
|
|
5
|
+
decorators: [(storyFn: () => React.JSX.Element) => <div style={{ padding: "30px" }}>{storyFn()}</div>],
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
export const standard = () => (
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { HeadingGroup } from "./HeadingGroup"
|
|
3
|
+
import * as HeadingGroupStories from './HeadingGroup.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={HeadingGroupStories} />
|
|
3
6
|
|
|
4
7
|
# Heading Group
|
|
5
8
|
|
|
6
|
-
<Canvas
|
|
7
|
-
<Story id="headers-heading-group--with-content" />
|
|
8
|
-
</Canvas>
|
|
9
|
+
<Canvas of={HeadingGroupStories.withContent} />
|
|
9
10
|
|
|
10
11
|
The HeadingGroup component provides a heading tag (h1-h6) combined with a paragraph tag as a subheading in an aria-minded fashion. Good for use in Card header components and other headers.
|
|
11
12
|
|
|
12
13
|
## Heading Group Properties
|
|
13
14
|
|
|
14
|
-
<
|
|
15
|
+
<ArgTypes of={HeadingGroup} />
|
|
15
16
|
|
|
16
17
|
## Theming Variables
|
|
17
18
|
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { BADGES } from "../../.storybook/constants"
|
|
3
3
|
import HeadingGroup from "./HeadingGroup"
|
|
4
|
-
import HeadingGroupDocumentation from "./HeadingGroup.docs.mdx"
|
|
5
4
|
|
|
6
5
|
export default {
|
|
7
6
|
title: "Headers/Heading Group 🚩",
|
|
8
7
|
id: "headers/heading-group",
|
|
9
8
|
parameters: {
|
|
10
|
-
docs: {
|
|
11
|
-
page: HeadingGroupDocumentation,
|
|
12
|
-
},
|
|
13
9
|
badges: [BADGES.GEN2],
|
|
14
10
|
},
|
|
15
11
|
}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { PageHeader } from "./PageHeader"
|
|
3
|
+
import * as PageHeaderStories from './PageHeader.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={PageHeaderStories} />
|
|
3
6
|
|
|
4
7
|
# Page Header
|
|
5
8
|
|
|
6
|
-
The page header component displays a title, with an optional subtitle and/or
|
|
9
|
+
The page header component displays a title, with an optional subtitle and/or arbitrary children elements.
|
|
7
10
|
|
|
8
|
-
<Canvas
|
|
9
|
-
<Story id="headers-page-header--with-content" />
|
|
10
|
-
</Canvas>
|
|
11
|
+
<Canvas of={PageHeaderStories.withContent} />
|
|
11
12
|
|
|
12
13
|
<br />
|
|
14
|
+
|
|
13
15
|
<br />
|
|
14
16
|
|
|
15
17
|
## Variants
|
|
@@ -18,19 +20,15 @@ The page header component displays a title, with an optional subtitle and/or arb
|
|
|
18
20
|
|
|
19
21
|
Set the `inverse` property to `true`.
|
|
20
22
|
|
|
21
|
-
<Canvas
|
|
22
|
-
<Story id="headers-page-header--inversed" />
|
|
23
|
-
</Canvas>
|
|
23
|
+
<Canvas of={PageHeaderStories.inversed} />
|
|
24
24
|
|
|
25
25
|
## Component Properties
|
|
26
26
|
|
|
27
|
-
<
|
|
27
|
+
<ArgTypes of={PageHeader} />
|
|
28
28
|
|
|
29
29
|
## Theming Variables
|
|
30
30
|
|
|
31
|
-
<Canvas
|
|
32
|
-
<Story id="headers-page-header--style-overrides" />
|
|
33
|
-
</Canvas>
|
|
31
|
+
<Canvas of={PageHeaderStories.styleOverrides} />
|
|
34
32
|
|
|
35
33
|
You can apply CSS variables to the `.page-header` selector to customize the appearance of the component.
|
|
36
34
|
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import * as React from "react"
|
|
2
2
|
import { BADGES } from "../../.storybook/constants"
|
|
3
3
|
import { PageHeader } from "./PageHeader"
|
|
4
|
-
import PageHeaderDocumentation from "./PageHeader.docs.mdx"
|
|
5
4
|
|
|
6
5
|
export default {
|
|
7
6
|
title: "Headers/Page Header 🚩",
|
|
8
7
|
id: "headers/page-header",
|
|
9
8
|
parameters: {
|
|
10
|
-
docs: {
|
|
11
|
-
page: PageHeaderDocumentation,
|
|
12
|
-
},
|
|
13
9
|
badges: [BADGES.GEN2],
|
|
14
10
|
},
|
|
15
11
|
}
|
|
@@ -343,7 +343,7 @@ const SiteHeader = (props: SiteHeaderProps) => {
|
|
|
343
343
|
return (
|
|
344
344
|
<>
|
|
345
345
|
{props.menuLinks.map((menuLink, index) => {
|
|
346
|
-
let menuContent: JSX.Element
|
|
346
|
+
let menuContent: React.JSX.Element
|
|
347
347
|
if (menuLink.subMenuLinks) {
|
|
348
348
|
menuContent = getDesktopDropdown(menuLink.title, menuLink.subMenuLinks)
|
|
349
349
|
} else {
|
|
@@ -1,27 +1,28 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { StepHeader } from "./StepHeader"
|
|
3
|
+
import * as StepHeaderStories from './StepHeader.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={StepHeaderStories} />
|
|
3
6
|
|
|
4
7
|
# Step Header
|
|
5
8
|
|
|
6
9
|
The step header component is used to quickly describe progress in a multi-step process. It displays the current step number, the total steps in the process, and the name of the current step. The component also requires the step preposition to be passed in along with any custom css classes if the use case requires customization.
|
|
7
10
|
|
|
8
|
-
<Canvas
|
|
9
|
-
<Story id="headers-step-header--basic-dynamic" />
|
|
10
|
-
</Canvas>
|
|
11
|
+
<Canvas of={StepHeaderStories.basicDynamic} />
|
|
11
12
|
|
|
12
13
|
## Varying Process Lengths
|
|
13
14
|
|
|
14
|
-
<Canvas
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
<Canvas of={StepHeaderStories.finalStep} />
|
|
16
|
+
|
|
17
|
+
<Canvas of={StepHeaderStories.doubleDigits} />
|
|
18
|
+
|
|
19
|
+
<Canvas of={StepHeaderStories.tripleDigits} />
|
|
20
|
+
|
|
21
|
+
## Component Properties
|
|
17
22
|
|
|
18
|
-
<
|
|
19
|
-
<Story id="headers-step-header--double-digits" />
|
|
20
|
-
</Canvas>
|
|
23
|
+
<ArgTypes of={StepHeader} />
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
<Story id="headers-step-header--triple-digits" />
|
|
24
|
-
</Canvas>
|
|
25
|
+
## Theming Variables
|
|
25
26
|
|
|
26
27
|
You can apply CSS variables to the `.step-header` selector to customize the appearance of the component.
|
|
27
28
|
|
|
@@ -18,7 +18,7 @@ const StepHeader = ({
|
|
|
18
18
|
className,
|
|
19
19
|
priority,
|
|
20
20
|
}: StepHeaderProps) => {
|
|
21
|
-
const Tag = `h${priority || 2}` as keyof JSX.IntrinsicElements
|
|
21
|
+
const Tag = `h${priority || 2}` as keyof React.JSX.IntrinsicElements
|
|
22
22
|
|
|
23
23
|
return (
|
|
24
24
|
<Tag className={`step-header ${className || ""}`}>
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { Swatch } from "../prototypes/Swatch"
|
|
3
3
|
import { PreferencesList } from "./PreferencesList"
|
|
4
|
+
import * as PreferencesListStories from './PreferencesList.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={PreferencesListStories} />
|
|
4
7
|
|
|
5
8
|
# Preferences List
|
|
6
9
|
|
|
7
10
|
The Preferences List component renders a list of cards that contain a title, an optional subtitle, an optional description, and an optional list of hyperlinks. Each card has an ordinal which indicates the position in the list the card is in.
|
|
8
11
|
|
|
9
|
-
<Canvas
|
|
10
|
-
<Story id="lists-preferences-list" />
|
|
11
|
-
</Canvas>
|
|
12
|
+
<Canvas of={PreferencesListStories.preferences} />
|
|
12
13
|
|
|
13
14
|
<br />
|
|
15
|
+
|
|
14
16
|
<br />
|
|
15
17
|
|
|
16
18
|
## Component Properties
|
|
17
19
|
|
|
18
|
-
<
|
|
20
|
+
<ArgTypes of={PreferencesList} />
|
|
19
21
|
|
|
20
22
|
## Theming Variables
|
|
21
23
|
|
|
@@ -25,7 +27,7 @@ You can apply CSS variables to the `.preferences-list` selector to customize the
|
|
|
25
27
|
| --------------------------- | --------------------------------------------------- | ---------------------------------------------------------------------- | --------------------------------------------------------- |
|
|
26
28
|
| `--title-color` | <Swatch colorVar="--bloom-color-gray-800" /> | Font color of title | `--bloom-color-gray-800` |
|
|
27
29
|
| `--title-text-transform` | Font | Capitalization of title | `uppercase` |
|
|
28
|
-
| `--ordinal-bg-color` | <Swatch colorVar="--bloom-color-white"
|
|
30
|
+
| `--ordinal-bg-color` | <Swatch colorVar="--bloom-color-white" /> | Ordinal background color | `--bloom-color-white` |
|
|
29
31
|
| `--ordinal-border-width` | Border | Ordinal border width | `--bloom-border-2;` |
|
|
30
32
|
| `--ordinal-border-color` | <Swatch colorVar="--bloom-color-primary" /> | Ordinal border color | `--bloom-color-primary` |
|
|
31
33
|
| `--ordinal-color` | <Swatch colorVar="--bloom-color-primary" /> | Ordinal font color | `--bloom-color-primary` |
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { BADGES } from "../../.storybook/constants"
|
|
3
3
|
import { LanguageNav } from "./LanguageNav"
|
|
4
|
-
import { text, withKnobs } from "@storybook/addon-knobs"
|
|
5
4
|
|
|
6
5
|
export default {
|
|
7
6
|
title: "Navigation/LanguageNav 🚩",
|
|
8
|
-
decorators: [(storyFn: any) => <div style={{ padding: "1rem" }}>{storyFn()}</div
|
|
7
|
+
decorators: [(storyFn: any) => <div style={{ padding: "1rem" }}>{storyFn()}</div>],
|
|
9
8
|
parameters: {
|
|
10
9
|
badges: [BADGES.GEN2],
|
|
11
10
|
},
|
|
@@ -13,7 +12,6 @@ export default {
|
|
|
13
12
|
|
|
14
13
|
export const Default = () => (
|
|
15
14
|
<LanguageNav
|
|
16
|
-
ariaLabel={text("ariaLabel", "")}
|
|
17
15
|
languages={[
|
|
18
16
|
{
|
|
19
17
|
label: "English",
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { ProgressNav } from "./ProgressNav"
|
|
3
|
+
import * as ProgressNavStories from './ProgressNav.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={ProgressNavStories} />
|
|
3
6
|
|
|
4
7
|
# Progress Nav
|
|
5
8
|
|
|
@@ -7,17 +10,19 @@ The progress nav component is used to illustrate progress in a multi-step proces
|
|
|
7
10
|
|
|
8
11
|
## Dot Style
|
|
9
12
|
|
|
10
|
-
<Canvas
|
|
11
|
-
<Story id="navigation-progress-nav--default" />
|
|
12
|
-
</Canvas>
|
|
13
|
+
<Canvas of={ProgressNavStories.Default} />
|
|
13
14
|
|
|
14
15
|
## Bar Style
|
|
15
16
|
|
|
16
|
-
<Canvas
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
<Canvas of={ProgressNavStories.barStyle} />
|
|
18
|
+
|
|
19
|
+
## Component Properties
|
|
20
|
+
|
|
21
|
+
<ArgTypes of={ProgressNav} />
|
|
22
|
+
|
|
23
|
+
## Theming Variables
|
|
19
24
|
|
|
20
|
-
You can apply CSS variables to the `.
|
|
25
|
+
You can apply CSS variables to the `.progress-nav` selector to customize the appearance of the component.
|
|
21
26
|
|
|
22
27
|
| Name | Type | Description | Default |
|
|
23
28
|
| ----------------------------- | ----- | ------------------------------------------- | ------------------------------ |
|
|
@@ -1,15 +1,11 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { BADGES } from "../../.storybook/constants"
|
|
3
3
|
import { ProgressNav } from "./ProgressNav"
|
|
4
|
-
import ProgressNavDocs from "./ProgressNav.docs.mdx"
|
|
5
4
|
|
|
6
5
|
export default {
|
|
7
6
|
title: "Navigation/Progress Nav 🚩",
|
|
8
7
|
decorators: [(storyFn: any) => <div style={{ padding: "1rem" }}>{storyFn()}</div>],
|
|
9
8
|
parameters: {
|
|
10
|
-
docs: {
|
|
11
|
-
page: ProgressNavDocs,
|
|
12
|
-
},
|
|
13
9
|
badges: [BADGES.GEN2],
|
|
14
10
|
},
|
|
15
11
|
}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { Swatch } from "../prototypes/Swatch"
|
|
3
3
|
import { SideNav } from "./SideNav"
|
|
4
|
+
import * as SideNavStories from './SideNav.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={SideNavStories} />
|
|
4
7
|
|
|
5
8
|
# Side Navigation
|
|
6
9
|
|
|
7
10
|
The side nav component renders a list of navigation links, any of which can optionally have children links for a hierarchical list.
|
|
8
11
|
|
|
9
|
-
<Canvas
|
|
10
|
-
<Story id="navigation-side-nav--current" />
|
|
11
|
-
</Canvas>
|
|
12
|
+
<Canvas of={SideNavStories.Current} />
|
|
12
13
|
|
|
13
14
|
<br />
|
|
15
|
+
|
|
14
16
|
<br />
|
|
15
17
|
|
|
16
18
|
## Component Properties
|
|
17
19
|
|
|
18
|
-
<
|
|
20
|
+
<ArgTypes of={SideNav} />
|
|
19
21
|
|
|
20
22
|
## Theming Variables
|
|
21
23
|
|
|
@@ -3,16 +3,12 @@ import { BADGES } from "../../.storybook/constants"
|
|
|
3
3
|
import { StandardTable } from "../tables/StandardTable"
|
|
4
4
|
import { SideNav } from "./SideNav"
|
|
5
5
|
import { mockHeaders, mockData } from "../tables/StandardTable.stories"
|
|
6
|
-
import SideNavDocumentation from "./SideNav.docs.mdx"
|
|
7
6
|
|
|
8
7
|
export default {
|
|
9
8
|
title: "Navigation/Side Nav 🚩",
|
|
10
9
|
id: "navigation/side-nav",
|
|
11
10
|
decorators: [(storyFn: any) => <div style={{ padding: "1rem" }}>{storyFn()}</div>],
|
|
12
11
|
parameters: {
|
|
13
|
-
docs: {
|
|
14
|
-
page: SideNavDocumentation,
|
|
15
|
-
},
|
|
16
12
|
badges: [BADGES.GEN2],
|
|
17
13
|
},
|
|
18
14
|
}
|
|
@@ -1,23 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { AlertBox } from "./AlertBox"
|
|
3
|
+
import * as AlertBoxStories from './AlertBox.stories';
|
|
4
|
+
|
|
5
|
+
<Meta of={AlertBoxStories} />
|
|
3
6
|
|
|
4
7
|
# Alert Box
|
|
5
8
|
|
|
6
9
|
The alert box component displays a themed notice with text.
|
|
7
10
|
|
|
8
|
-
<Canvas
|
|
9
|
-
<Story id="notifications-alert-box" />
|
|
10
|
-
</Canvas>
|
|
11
|
+
<Canvas of={AlertBoxStories.AlertBoxAlert} />
|
|
11
12
|
|
|
12
13
|
## Component Properties
|
|
13
14
|
|
|
14
|
-
<
|
|
15
|
+
<ArgTypes of={AlertBox} />
|
|
15
16
|
|
|
16
17
|
## Theming Variables
|
|
17
18
|
|
|
18
|
-
<Canvas
|
|
19
|
-
<Story id="notifications-alert-box--style-overrides" />
|
|
20
|
-
</Canvas>
|
|
19
|
+
<Canvas of={AlertBoxStories.styleOverrides} />
|
|
21
20
|
|
|
22
21
|
You can apply CSS variables to the `.alert-box` selector to customize the appearance of the component.
|
|
23
22
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from "react"
|
|
2
2
|
import { AlertBox } from "./AlertBox"
|
|
3
|
-
import AlertBoxDocumentation from "./AlertBox.docs.mdx"
|
|
4
3
|
import { BADGES } from "../../.storybook/constants"
|
|
5
4
|
import { withMenuLinks } from "../headers/SiteHeader.stories"
|
|
6
5
|
|
|
@@ -10,9 +9,6 @@ export default {
|
|
|
10
9
|
decorators: [(storyFn: any) => <div style={{ padding: "1rem" }}>{storyFn()}</div>],
|
|
11
10
|
component: AlertBox,
|
|
12
11
|
parameters: {
|
|
13
|
-
docs: {
|
|
14
|
-
page: AlertBoxDocumentation,
|
|
15
|
-
},
|
|
16
12
|
badges: [BADGES.GEN2],
|
|
17
13
|
},
|
|
18
14
|
}
|
|
@@ -5,7 +5,6 @@ import { ApplicationStatus } from "./ApplicationStatus"
|
|
|
5
5
|
import { ApplicationStatusType } from "../global/ApplicationStatusType"
|
|
6
6
|
import { t } from "../helpers/translator"
|
|
7
7
|
import Archer from "../../__tests__/fixtures/archer.json"
|
|
8
|
-
import { text, withKnobs } from "@storybook/addon-knobs"
|
|
9
8
|
import formatDateTime from "../helpers/DateFormat"
|
|
10
9
|
|
|
11
10
|
dayjs.extend(advancedFormat)
|
|
@@ -13,7 +12,7 @@ dayjs.extend(advancedFormat)
|
|
|
13
12
|
export default {
|
|
14
13
|
component: ApplicationStatus,
|
|
15
14
|
title: "Notifications/Application Status",
|
|
16
|
-
decorators: [(storyFn: any) => <div>{storyFn()}</div
|
|
15
|
+
decorators: [(storyFn: any) => <div>{storyFn()}</div>],
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
const listing = Object.assign({}, Archer) as any
|
|
@@ -74,7 +73,7 @@ export const pastDueAndVivid = () => (
|
|
|
74
73
|
|
|
75
74
|
export const pastDueWithStyles = () => (
|
|
76
75
|
<ApplicationStatus
|
|
77
|
-
className={
|
|
76
|
+
className={"place-content-center"}
|
|
78
77
|
content={
|
|
79
78
|
t("listings.applicationsClosed") + ": " + formatDateTime(listingPast.applicationDueDate)
|
|
80
79
|
}
|
|
@@ -87,7 +86,7 @@ export const pastDueWithIconColor = () => (
|
|
|
87
86
|
content={
|
|
88
87
|
t("listings.applicationsClosed") + ": " + formatDateTime(listingPast.applicationDueDate)
|
|
89
88
|
}
|
|
90
|
-
iconColor={
|
|
89
|
+
iconColor={"#ff0000"}
|
|
91
90
|
status={ApplicationStatusType.Closed}
|
|
92
91
|
/>
|
|
93
92
|
)
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ArgTypes, Canvas, Meta } from "@storybook/blocks"
|
|
2
2
|
import { Swatch } from "../prototypes/Swatch"
|
|
3
3
|
import { Modal } from "./Modal"
|
|
4
|
+
import * as ModalStories from './Modal.stories';
|
|
5
|
+
|
|
6
|
+
<Meta of={ModalStories} />
|
|
4
7
|
|
|
5
8
|
# Modal
|
|
6
9
|
|
|
7
10
|
The modal component displays a modal with a title and optional children typed as either a string or JSX. The modal includes a number of other optional settings.
|
|
8
11
|
|
|
9
|
-
<Canvas
|
|
10
|
-
<Story id="overlays-modal--basic-modal" />
|
|
11
|
-
</Canvas>
|
|
12
|
+
<Canvas of={ModalStories.BasicModal} />
|
|
12
13
|
|
|
13
14
|
<br />
|
|
15
|
+
|
|
14
16
|
<br />
|
|
15
17
|
|
|
16
18
|
## Component Properties
|
|
17
19
|
|
|
18
|
-
<
|
|
20
|
+
<ArgTypes of={Modal} />
|
|
19
21
|
|
|
20
22
|
## Theming Variables
|
|
21
23
|
|