@bloom-housing/ui-components 12.7.6 → 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 (105) 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/global/forms.scss +14 -14
  80. package/src/global/lists.scss +13 -8
  81. package/src/headers/HeadingGroup.docs.mdx +6 -5
  82. package/src/headers/HeadingGroup.stories.tsx +0 -4
  83. package/src/headers/PageHeader.docs.mdx +10 -12
  84. package/src/headers/PageHeader.stories.tsx +0 -4
  85. package/src/headers/StepHeader.docs.mdx +14 -13
  86. package/src/headers/StepHeader.scss +2 -2
  87. package/src/headers/StepHeader.stories.tsx +1 -2
  88. package/src/lists/PreferencesList.docs.mdx +8 -6
  89. package/src/navigation/LanguageNav.stories.tsx +1 -3
  90. package/src/navigation/ProgressNav.docs.mdx +13 -8
  91. package/src/navigation/ProgressNav.scss +12 -12
  92. package/src/navigation/ProgressNav.stories.tsx +0 -4
  93. package/src/navigation/SideNav.docs.mdx +7 -5
  94. package/src/navigation/SideNav.stories.tsx +0 -4
  95. package/src/notifications/AlertBox.docs.mdx +7 -8
  96. package/src/notifications/AlertBox.scss +3 -3
  97. package/src/notifications/AlertBox.stories.tsx +0 -4
  98. package/src/notifications/ApplicationStatus.stories.tsx +3 -4
  99. package/src/overlays/Modal.docs.mdx +7 -5
  100. package/src/overlays/Modal.stories.tsx +273 -232
  101. package/src/overlays/Overlay.tsx +8 -2
  102. package/src/page_components/ApplicationTimeline.scss +9 -9
  103. package/src/page_components/listing/ListingCard.docs.mdx +9 -9
  104. package/src/text/Heading.docs.mdx +7 -5
  105. package/src/text/Tag.docs.mdx +10 -14
@@ -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 {...props}>{props.children}</OverlayInner>
90
+ <OverlayInner nodeRef={nodeRef} {...props}>
91
+ {props.children}
92
+ </OverlayInner>
87
93
  </RemoveScroll>
88
94
  </CSSTransition>,
89
95
  elForPortal
@@ -1,6 +1,6 @@
1
1
  .markdown ul.application-timeline {
2
2
  @apply mb-8;
3
- @apply ml-0;
3
+ @apply ms-0;
4
4
  }
5
5
 
6
6
  .application-timeline {
@@ -11,9 +11,9 @@
11
11
  text-transform: unset;
12
12
 
13
13
  .absolute {
14
- margin-top: 0.25rem;
14
+ margin-block-start: 0.25rem;
15
15
  z-index: 2;
16
- margin-left: -0.4rem;
16
+ margin-inline-start: -0.4rem;
17
17
  }
18
18
 
19
19
  p {
@@ -21,23 +21,23 @@
21
21
  }
22
22
 
23
23
  &:before {
24
- left: 50%;
24
+ inset-inline-start: 50%;
25
25
  }
26
26
 
27
27
  &:after {
28
- left: 0;
28
+ inset-inline-start: 0;
29
29
  }
30
30
 
31
31
  &:first-of-type {
32
32
  &:after {
33
- left: 50%;
33
+ inset-inline-start: 50%;
34
34
  }
35
35
  }
36
36
 
37
37
  &:last-of-type {
38
38
  &:after {
39
- left: auto;
40
- right: 50%;
39
+ inset-inline-start: auto;
40
+ inset-inline-end: 50%;
41
41
  }
42
42
  }
43
43
 
@@ -67,6 +67,6 @@
67
67
  }
68
68
 
69
69
  .progress-nav__dot-item::after {
70
- top: 1rem;
70
+ inset-block-start: 1rem;
71
71
  }
72
72
  }
@@ -1,15 +1,17 @@
1
- import { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
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
- <ArgsTable of={ListingCard} />
29
+ <ArgTypes of={ListingCard} />
30
30
 
31
- **Note:** for accessbility 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.
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 { 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 { 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
- <ArgsTable of={Heading} />
20
+ <ArgTypes of={Heading} />
@@ -1,15 +1,17 @@
1
- import { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
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
- <ArgsTable of={Tag} />
41
+ <ArgTypes of={Tag} />
46
42
 
47
43
  ## Theming Variables
48
44