@bloom-housing/ui-components 12.7.7 → 13.0.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.
- 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.stories.d.ts +58 -9
- package/dist/src/actions/Button.stories.js +54 -38
- package/dist/src/actions/Button.stories.js.map +1 -1
- package/dist/src/actions/ButtonGroup.stories.d.ts +0 -5
- package/dist/src/actions/ButtonGroup.stories.js +0 -4
- package/dist/src/actions/ButtonGroup.stories.js.map +1 -1
- package/dist/src/blocks/Card.stories.d.ts +0 -5
- package/dist/src/blocks/Card.stories.js +0 -4
- package/dist/src/blocks/Card.stories.js.map +1 -1
- package/dist/src/blocks/ImageCard.stories.d.ts +0 -5
- package/dist/src/blocks/ImageCard.stories.js +0 -4
- package/dist/src/blocks/ImageCard.stories.js.map +1 -1
- package/dist/src/blocks/InfoCard.stories.d.ts +0 -5
- package/dist/src/blocks/InfoCard.stories.js +0 -4
- package/dist/src/blocks/InfoCard.stories.js.map +1 -1
- package/dist/src/blocks/MediaCard.stories.d.ts +0 -5
- package/dist/src/blocks/MediaCard.stories.js +0 -4
- package/dist/src/blocks/MediaCard.stories.js.map +1 -1
- package/dist/src/blocks/StandardCard.stories.d.ts +0 -5
- package/dist/src/blocks/StandardCard.stories.js +0 -4
- package/dist/src/blocks/StandardCard.stories.js.map +1 -1
- package/dist/src/forms/Dropzone.stories.d.ts +1 -1
- package/dist/src/forms/Dropzone.stories.js +1 -2
- package/dist/src/forms/Dropzone.stories.js.map +1 -1
- package/dist/src/forms/MultiSelectField.stories.d.ts +0 -5
- package/dist/src/forms/MultiSelectField.stories.js +0 -4
- package/dist/src/forms/MultiSelectField.stories.js.map +1 -1
- package/dist/src/headers/HeadingGroup.stories.d.ts +0 -5
- package/dist/src/headers/HeadingGroup.stories.js +0 -4
- package/dist/src/headers/HeadingGroup.stories.js.map +1 -1
- package/dist/src/headers/PageHeader.stories.d.ts +0 -5
- package/dist/src/headers/PageHeader.stories.js +0 -4
- package/dist/src/headers/PageHeader.stories.js.map +1 -1
- package/dist/src/headers/StepHeader.stories.js +1 -2
- package/dist/src/headers/StepHeader.stories.js.map +1 -1
- package/dist/src/navigation/LanguageNav.stories.d.ts +1 -1
- package/dist/src/navigation/LanguageNav.stories.js +2 -3
- package/dist/src/navigation/LanguageNav.stories.js.map +1 -1
- package/dist/src/navigation/ProgressNav.stories.d.ts +0 -5
- package/dist/src/navigation/ProgressNav.stories.js +0 -4
- package/dist/src/navigation/ProgressNav.stories.js.map +1 -1
- package/dist/src/navigation/SideNav.stories.d.ts +0 -5
- package/dist/src/navigation/SideNav.stories.js +0 -4
- package/dist/src/navigation/SideNav.stories.js.map +1 -1
- package/dist/src/notifications/AlertBox.stories.d.ts +0 -5
- package/dist/src/notifications/AlertBox.stories.js +0 -4
- package/dist/src/notifications/AlertBox.stories.js.map +1 -1
- package/dist/src/notifications/ApplicationStatus.stories.d.ts +1 -1
- package/dist/src/notifications/ApplicationStatus.stories.js +3 -4
- package/dist/src/notifications/ApplicationStatus.stories.js.map +1 -1
- package/dist/src/overlays/Modal.stories.d.ts +101 -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/package.json +30 -30
- 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/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/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/MultiSelectField.docs.mdx +6 -5
- package/src/forms/MultiSelectField.stories.tsx +0 -4
- 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/StepHeader.docs.mdx +14 -13
- package/src/headers/StepHeader.stories.tsx +1 -2
- 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/Tag.docs.mdx +10 -14
|
@@ -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
|
|
|
@@ -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
|
|