@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.
Files changed (99) hide show
  1. package/dist/__tests__/storyshots.spec.d.ts +0 -1
  2. package/dist/__tests__/storyshots.spec.js +9 -9
  3. package/dist/__tests__/storyshots.spec.js.map +1 -1
  4. package/dist/src/actions/Button.stories.d.ts +58 -9
  5. package/dist/src/actions/Button.stories.js +54 -38
  6. package/dist/src/actions/Button.stories.js.map +1 -1
  7. package/dist/src/actions/ButtonGroup.stories.d.ts +0 -5
  8. package/dist/src/actions/ButtonGroup.stories.js +0 -4
  9. package/dist/src/actions/ButtonGroup.stories.js.map +1 -1
  10. package/dist/src/blocks/Card.stories.d.ts +0 -5
  11. package/dist/src/blocks/Card.stories.js +0 -4
  12. package/dist/src/blocks/Card.stories.js.map +1 -1
  13. package/dist/src/blocks/ImageCard.stories.d.ts +0 -5
  14. package/dist/src/blocks/ImageCard.stories.js +0 -4
  15. package/dist/src/blocks/ImageCard.stories.js.map +1 -1
  16. package/dist/src/blocks/InfoCard.stories.d.ts +0 -5
  17. package/dist/src/blocks/InfoCard.stories.js +0 -4
  18. package/dist/src/blocks/InfoCard.stories.js.map +1 -1
  19. package/dist/src/blocks/MediaCard.stories.d.ts +0 -5
  20. package/dist/src/blocks/MediaCard.stories.js +0 -4
  21. package/dist/src/blocks/MediaCard.stories.js.map +1 -1
  22. package/dist/src/blocks/StandardCard.stories.d.ts +0 -5
  23. package/dist/src/blocks/StandardCard.stories.js +0 -4
  24. package/dist/src/blocks/StandardCard.stories.js.map +1 -1
  25. package/dist/src/forms/Dropzone.stories.d.ts +1 -1
  26. package/dist/src/forms/Dropzone.stories.js +1 -2
  27. package/dist/src/forms/Dropzone.stories.js.map +1 -1
  28. package/dist/src/forms/MultiSelectField.stories.d.ts +0 -5
  29. package/dist/src/forms/MultiSelectField.stories.js +0 -4
  30. package/dist/src/forms/MultiSelectField.stories.js.map +1 -1
  31. package/dist/src/headers/HeadingGroup.stories.d.ts +0 -5
  32. package/dist/src/headers/HeadingGroup.stories.js +0 -4
  33. package/dist/src/headers/HeadingGroup.stories.js.map +1 -1
  34. package/dist/src/headers/PageHeader.stories.d.ts +0 -5
  35. package/dist/src/headers/PageHeader.stories.js +0 -4
  36. package/dist/src/headers/PageHeader.stories.js.map +1 -1
  37. package/dist/src/headers/StepHeader.stories.js +1 -2
  38. package/dist/src/headers/StepHeader.stories.js.map +1 -1
  39. package/dist/src/navigation/LanguageNav.stories.d.ts +1 -1
  40. package/dist/src/navigation/LanguageNav.stories.js +2 -3
  41. package/dist/src/navigation/LanguageNav.stories.js.map +1 -1
  42. package/dist/src/navigation/ProgressNav.stories.d.ts +0 -5
  43. package/dist/src/navigation/ProgressNav.stories.js +0 -4
  44. package/dist/src/navigation/ProgressNav.stories.js.map +1 -1
  45. package/dist/src/navigation/SideNav.stories.d.ts +0 -5
  46. package/dist/src/navigation/SideNav.stories.js +0 -4
  47. package/dist/src/navigation/SideNav.stories.js.map +1 -1
  48. package/dist/src/notifications/AlertBox.stories.d.ts +0 -5
  49. package/dist/src/notifications/AlertBox.stories.js +0 -4
  50. package/dist/src/notifications/AlertBox.stories.js.map +1 -1
  51. package/dist/src/notifications/ApplicationStatus.stories.d.ts +1 -1
  52. package/dist/src/notifications/ApplicationStatus.stories.js +3 -4
  53. package/dist/src/notifications/ApplicationStatus.stories.js.map +1 -1
  54. package/dist/src/overlays/Modal.stories.d.ts +101 -13
  55. package/dist/src/overlays/Modal.stories.js +119 -76
  56. package/dist/src/overlays/Modal.stories.js.map +1 -1
  57. package/dist/src/overlays/Overlay.d.ts +1 -0
  58. package/dist/src/overlays/Overlay.js +5 -4
  59. package/dist/src/overlays/Overlay.js.map +1 -1
  60. package/package.json +30 -30
  61. package/src/actions/Button.docs.mdx +6 -5
  62. package/src/actions/Button.stories.tsx +73 -62
  63. package/src/actions/ButtonGroup.docs.mdx +7 -5
  64. package/src/actions/ButtonGroup.stories.tsx +0 -4
  65. package/src/blocks/Card.docs.mdx +10 -11
  66. package/src/blocks/Card.stories.tsx +0 -4
  67. package/src/blocks/ImageCard.docs.mdx +8 -6
  68. package/src/blocks/ImageCard.stories.tsx +0 -4
  69. package/src/blocks/InfoCard.docs.mdx +8 -6
  70. package/src/blocks/InfoCard.stories.tsx +0 -4
  71. package/src/blocks/MediaCard.docs.mdx +10 -11
  72. package/src/blocks/MediaCard.stories.tsx +0 -4
  73. package/src/blocks/StandardCard.docs.mdx +7 -8
  74. package/src/blocks/StandardCard.stories.tsx +0 -4
  75. package/src/documentation/{Utilities.stories.mdx → Utilities.docs.mdx} +4 -2
  76. package/src/forms/Dropzone.stories.tsx +1 -2
  77. package/src/forms/MultiSelectField.docs.mdx +6 -5
  78. package/src/forms/MultiSelectField.stories.tsx +0 -4
  79. package/src/headers/HeadingGroup.docs.mdx +6 -5
  80. package/src/headers/HeadingGroup.stories.tsx +0 -4
  81. package/src/headers/PageHeader.docs.mdx +10 -12
  82. package/src/headers/PageHeader.stories.tsx +0 -4
  83. package/src/headers/StepHeader.docs.mdx +14 -13
  84. package/src/headers/StepHeader.stories.tsx +1 -2
  85. package/src/lists/PreferencesList.docs.mdx +8 -6
  86. package/src/navigation/LanguageNav.stories.tsx +1 -3
  87. package/src/navigation/ProgressNav.docs.mdx +13 -8
  88. package/src/navigation/ProgressNav.stories.tsx +0 -4
  89. package/src/navigation/SideNav.docs.mdx +7 -5
  90. package/src/navigation/SideNav.stories.tsx +0 -4
  91. package/src/notifications/AlertBox.docs.mdx +7 -8
  92. package/src/notifications/AlertBox.stories.tsx +0 -4
  93. package/src/notifications/ApplicationStatus.stories.tsx +3 -4
  94. package/src/overlays/Modal.docs.mdx +7 -5
  95. package/src/overlays/Modal.stories.tsx +273 -232
  96. package/src/overlays/Overlay.tsx +8 -2
  97. package/src/page_components/listing/ListingCard.docs.mdx +9 -9
  98. package/src/text/Heading.docs.mdx +7 -5
  99. package/src/text/Tag.docs.mdx +10 -14
@@ -1,27 +1,28 @@
1
- import { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
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
- <Story id="headers-step-header--final-step" />
16
- </Canvas>
15
+ <Canvas of={StepHeaderStories.finalStep} />
16
+
17
+ <Canvas of={StepHeaderStories.doubleDigits} />
18
+
19
+ <Canvas of={StepHeaderStories.tripleDigits} />
20
+
21
+ ## Component Properties
17
22
 
18
- <Canvas>
19
- <Story id="headers-step-header--double-digits" />
20
- </Canvas>
23
+ <ArgTypes of={StepHeader} />
21
24
 
22
- <Canvas>
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,5 +1,4 @@
1
- import { useState } from "@storybook/addons"
2
- import * as React from "react"
1
+ import React, { useState } from "react"
3
2
  import { BADGES } from "../../.storybook/constants"
4
3
  import { StepHeader } from "./StepHeader"
5
4
  import { Button } from "../actions/Button"
@@ -1,21 +1,23 @@
1
- import { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
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
- <ArgsTable of={PreferencesList} />
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" /> | Ordinal background color | `--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>, withKnobs],
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 { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
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
- <Story id="navigation-progress-nav--bar-style" />
18
- </Canvas>
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 `.progrss-nav` selector to customize the appearance of the component.
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 { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
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
- <ArgsTable of={SideNav} />
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 { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
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
- <ArgsTable of={AlertBox} />
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>, withKnobs],
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={text("className", "place-content-center")}
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={text("Icon Color", "#ff0000")}
89
+ iconColor={"#ff0000"}
91
90
  status={ApplicationStatusType.Closed}
92
91
  />
93
92
  )
@@ -1,21 +1,23 @@
1
- import { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
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
- <ArgsTable of={Modal} />
20
+ <ArgTypes of={Modal} />
19
21
 
20
22
  ## Theming Variables
21
23