@bloom-housing/ui-components 10.0.16 → 12.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 (108) hide show
  1. package/dist/__tests__/actions/ExpandableContent.test.js +1 -1
  2. package/dist/__tests__/actions/ExpandableContent.test.js.map +1 -1
  3. package/dist/__tests__/blocks/FormCard.test.js +2 -4
  4. package/dist/__tests__/blocks/FormCard.test.js.map +1 -1
  5. package/dist/__tests__/page_components/ContentAccordion.test.js +2 -2
  6. package/dist/__tests__/page_components/ContentAccordion.test.js.map +1 -1
  7. package/dist/src/actions/Button.d.ts +1 -1
  8. package/dist/src/actions/Button.js +1 -1
  9. package/dist/src/actions/Button.js.map +1 -1
  10. package/dist/src/actions/LinkButton.js +2 -2
  11. package/dist/src/actions/LinkButton.js.map +1 -1
  12. package/dist/src/blocks/DashBlock.js +1 -1
  13. package/dist/src/blocks/DashBlock.js.map +1 -1
  14. package/dist/src/blocks/FormCard.d.ts +1 -5
  15. package/dist/src/blocks/FormCard.js +3 -4
  16. package/dist/src/blocks/FormCard.js.map +1 -1
  17. package/dist/src/blocks/FormCard.stories.d.ts +6 -0
  18. package/dist/src/blocks/FormCard.stories.js +9 -0
  19. package/dist/src/blocks/FormCard.stories.js.map +1 -0
  20. package/dist/src/blocks/ImageCard.js +1 -1
  21. package/dist/src/blocks/ImageCard.js.map +1 -1
  22. package/dist/src/blocks/Tooltip.js +2 -2
  23. package/dist/src/blocks/Tooltip.js.map +1 -1
  24. package/dist/src/blocks/ViewItem.js +2 -2
  25. package/dist/src/blocks/ViewItem.js.map +1 -1
  26. package/dist/src/forms/Dropzone.js +1 -1
  27. package/dist/src/forms/Dropzone.js.map +1 -1
  28. package/dist/src/forms/Field.js +1 -1
  29. package/dist/src/forms/Field.js.map +1 -1
  30. package/dist/src/forms/FieldGroup.js +8 -8
  31. package/dist/src/forms/FieldGroup.js.map +1 -1
  32. package/dist/src/forms/HouseholdMemberForm.js +1 -1
  33. package/dist/src/forms/HouseholdMemberForm.js.map +1 -1
  34. package/dist/src/forms/MultiSelectField.js +1 -1
  35. package/dist/src/forms/MultiSelectField.js.map +1 -1
  36. package/dist/src/forms/PhoneField.js +2 -2
  37. package/dist/src/forms/PhoneField.js.map +1 -1
  38. package/dist/src/forms/Select.js +2 -2
  39. package/dist/src/forms/Select.js.map +1 -1
  40. package/dist/src/forms/Textarea.js +1 -1
  41. package/dist/src/forms/Textarea.js.map +1 -1
  42. package/dist/src/headers/Hero.js +1 -1
  43. package/dist/src/headers/Hero.js.map +1 -1
  44. package/dist/src/headers/PageHeader.js +1 -1
  45. package/dist/src/headers/PageHeader.js.map +1 -1
  46. package/dist/src/headers/SiteHeader.js +3 -3
  47. package/dist/src/headers/SiteHeader.js.map +1 -1
  48. package/dist/src/icons/Icon.js +2 -2
  49. package/dist/src/icons/Icon.js.map +1 -1
  50. package/dist/src/notifications/AlertBox.js +1 -1
  51. package/dist/src/notifications/AlertBox.js.map +1 -1
  52. package/dist/src/notifications/ErrorMessage.js +1 -1
  53. package/dist/src/notifications/ErrorMessage.js.map +1 -1
  54. package/dist/src/overlays/LoadingOverlay.js +1 -1
  55. package/dist/src/overlays/LoadingOverlay.js.map +1 -1
  56. package/dist/src/page_components/listing/ContentAccordion.js +1 -1
  57. package/dist/src/page_components/listing/ContentAccordion.js.map +1 -1
  58. package/dist/src/page_components/listing/ListingCard.js +1 -1
  59. package/dist/src/page_components/listing/ListingCard.js.map +1 -1
  60. package/dist/src/page_components/listing/listing_sidebar/GetApplication.js +2 -2
  61. package/dist/src/page_components/listing/listing_sidebar/GetApplication.js.map +1 -1
  62. package/dist/src/page_components/sign-in/FormSignIn.js +1 -1
  63. package/dist/src/page_components/sign-in/FormSignIn.js.map +1 -1
  64. package/dist/src/page_components/sign-in/FormSignInAddPhone.js +1 -1
  65. package/dist/src/page_components/sign-in/FormSignInAddPhone.js.map +1 -1
  66. package/dist/src/page_components/sign-in/FormSignInMFACode.js +1 -1
  67. package/dist/src/page_components/sign-in/FormSignInMFACode.js.map +1 -1
  68. package/dist/src/page_components/sign-in/FormSignInMFAType.js +2 -2
  69. package/dist/src/page_components/sign-in/FormSignInMFAType.js.map +1 -1
  70. package/dist/src/page_components/sign-in/FormTerms.js +1 -1
  71. package/dist/src/page_components/sign-in/FormTerms.js.map +1 -1
  72. package/dist/src/tables/AgPagination.js +4 -4
  73. package/dist/src/tables/AgPagination.js.map +1 -1
  74. package/package.json +28 -26
  75. package/src/actions/Button.tsx +2 -2
  76. package/src/actions/LinkButton.tsx +2 -2
  77. package/src/blocks/DashBlock.tsx +1 -1
  78. package/src/blocks/FormCard.scss +21 -10
  79. package/src/blocks/FormCard.stories.tsx +12 -0
  80. package/src/blocks/FormCard.tsx +5 -12
  81. package/src/blocks/ImageCard.tsx +1 -1
  82. package/src/blocks/Tooltip.tsx +2 -2
  83. package/src/blocks/ViewItem.tsx +2 -2
  84. package/src/forms/Dropzone.tsx +1 -1
  85. package/src/forms/Field.tsx +1 -1
  86. package/src/forms/FieldGroup.tsx +10 -10
  87. package/src/forms/HouseholdMemberForm.tsx +1 -1
  88. package/src/forms/MultiSelectField.tsx +1 -1
  89. package/src/forms/PhoneField.tsx +2 -2
  90. package/src/forms/Select.tsx +3 -3
  91. package/src/forms/Textarea.tsx +1 -1
  92. package/src/global/mixins.scss +11 -0
  93. package/src/headers/Hero.tsx +1 -1
  94. package/src/headers/PageHeader.tsx +1 -1
  95. package/src/headers/SiteHeader.tsx +3 -3
  96. package/src/icons/Icon.tsx +2 -2
  97. package/src/notifications/AlertBox.tsx +1 -1
  98. package/src/notifications/ErrorMessage.tsx +1 -1
  99. package/src/overlays/LoadingOverlay.tsx +1 -1
  100. package/src/page_components/listing/ContentAccordion.tsx +1 -1
  101. package/src/page_components/listing/ListingCard.tsx +1 -1
  102. package/src/page_components/listing/listing_sidebar/GetApplication.tsx +2 -2
  103. package/src/page_components/sign-in/FormSignIn.tsx +1 -1
  104. package/src/page_components/sign-in/FormSignInAddPhone.tsx +1 -1
  105. package/src/page_components/sign-in/FormSignInMFACode.tsx +1 -1
  106. package/src/page_components/sign-in/FormSignInMFAType.tsx +2 -2
  107. package/src/page_components/sign-in/FormTerms.tsx +1 -1
  108. package/src/tables/AgPagination.tsx +4 -4
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bloom-housing/ui-components",
3
- "version": "10.0.16",
3
+ "version": "12.0.0",
4
4
  "author": "Sean Albert <sean.albert@exygy.com>",
5
5
  "description": "Shared user interface components for Bloom affordable housing system",
6
6
  "homepage": "https://github.com/bloom-housing/ui-components",
@@ -42,29 +42,29 @@
42
42
  "@babel/preset-env": "^7.15.4",
43
43
  "@commitlint/cli": "^13.1.0",
44
44
  "@commitlint/config-conventional": "^13.1.0",
45
- "@emotion/core": "^10.0.35",
46
- "@emotion/styled": "^10.0.27",
47
- "@geometricpanda/storybook-addon-badges": "^0.2.1",
48
- "@storybook/addon-a11y": "^6.3.8",
49
- "@storybook/addon-actions": "^6.3.8",
50
- "@storybook/addon-docs": "^6.3.8",
51
- "@storybook/addon-knobs": "^6.3.1",
45
+ "@geometricpanda/storybook-addon-badges": "^1.1.1",
46
+ "@storybook/addon-actions": "^6.5.16",
47
+ "@storybook/addon-a11y": "^6.5.16",
48
+ "@storybook/addon-essentials": "^6.5.16",
49
+ "@storybook/addon-interactions": "^6.5.16",
50
+ "@storybook/addon-links": "^6.5.16",
51
+ "@storybook/addon-knobs": "^6.4.0",
52
52
  "@storybook/addon-storyshots": "^6.3.8",
53
53
  "@storybook/addon-storyshots-puppeteer": "^6.3.8",
54
- "@storybook/addon-viewport": "^6.3.8",
55
- "@storybook/addons": "^6.3.8",
56
- "@storybook/api": "^6.3.8",
57
- "@storybook/components": "^6.3.8",
58
- "@storybook/core-events": "^6.3.8",
59
- "@storybook/react": "^6.3.8",
60
- "@storybook/theming": "^6.3.8",
61
- "@testing-library/jest-dom": "^5.11.9",
62
- "@testing-library/react": "^11.2.5",
54
+ "@storybook/addon-postcss": "^2.0.0",
55
+ "@storybook/builder-webpack5": "^6.5.16",
56
+ "@storybook/manager-webpack5": "^6.5.16",
57
+ "@storybook/node-logger": "^6.5.16",
58
+ "@storybook/preset-create-react-app": "^4.1.2",
59
+ "@storybook/react": "^6.5.16",
60
+ "@storybook/testing-library": "^0.0.13",
61
+ "@testing-library/jest-dom": "5.16.5",
62
+ "@testing-library/react": "14.0.0",
63
63
  "@types/dompurify": "^2.3.3",
64
64
  "@types/jest": "^26.0.14",
65
65
  "@types/jwt-decode": "^2.2.1",
66
66
  "@types/mdx": "^2.0.1",
67
- "@types/node": "^12.12.67",
67
+ "@types/node": "18.14.6",
68
68
  "@types/node-polyglot": "^2.4.1",
69
69
  "@types/pretty": "2.0.1",
70
70
  "@types/react-beautiful-dnd": "^13.1.1",
@@ -74,7 +74,7 @@
74
74
  "@types/react-test-renderer": "^16.9.3",
75
75
  "@types/react-text-mask": "^5.4.6",
76
76
  "@types/react-transition-group": "^4.4.0",
77
- "@types/webpack": "^4.41.22",
77
+ "@types/webpack": "5.28.0",
78
78
  "@typescript-eslint/parser": "^5.12.1",
79
79
  "@typescript-eslint/eslint-plugin": "^5.12.1",
80
80
  "autoprefixer": "^10.3.4",
@@ -94,8 +94,11 @@
94
94
  "jest-environment-jsdom": "^26.5.3",
95
95
  "lint-staged": "^10.4.0",
96
96
  "mockdate": "^3.0.2",
97
- "postcss": "^8.3.6",
98
- "postcss-loader": "^4.3",
97
+ "postcss": "8.4.19",
98
+ "postcss-import": "^14.1.0",
99
+ "postcss-load-config": "^3.1.4",
100
+ "postcss-loader": "7.0.1",
101
+ "postcss-nested": "6.0.0",
99
102
  "preact": "^10.5.14",
100
103
  "prettier": "^2.1.0",
101
104
  "pretty": "2.0.0",
@@ -112,7 +115,7 @@
112
115
  "ts-jest": "^26.4.1",
113
116
  "ts-loader": "^8.0.4",
114
117
  "typescript": "^4.9.4",
115
- "webpack": "^4.44.2"
118
+ "webpack": "5.76.0"
116
119
  },
117
120
  "dependencies": {
118
121
  "@fortawesome/fontawesome-svg-core": "^6.1.1",
@@ -122,7 +125,6 @@
122
125
  "@mapbox/mapbox-sdk": "^0.13.0",
123
126
  "@types/jwt-decode": "^2.2.1",
124
127
  "@types/mdx": "^2.0.1",
125
- "@types/node": "^12.12.67",
126
128
  "@types/node-polyglot": "^2.4.1",
127
129
  "@types/react-beautiful-dnd": "^13.1.1",
128
130
  "@types/react-dom": "^16.9.5",
@@ -137,10 +139,10 @@
137
139
  "markdown-to-jsx": "7.1.8",
138
140
  "nanoid": "^3.1.12",
139
141
  "node-polyglot": "^2.4.0",
140
- "react": "^17.0.2",
141
- "react-accessible-accordion": "^3.3.5",
142
+ "react": "18.2.0",
143
+ "react-accessible-accordion": "5.0.0",
142
144
  "react-beautiful-dnd": "^13.1.0",
143
- "react-dom": "^17.0.2",
145
+ "react-dom": "18.2.0",
144
146
  "react-dropzone": "^11.3.2",
145
147
  "react-focus-lock": "^2.5.2",
146
148
  "react-hook-form": "^6.15.5",
@@ -4,7 +4,7 @@ import { AppearanceProps, classNamesForAppearanceTypes } from "../global/Appeara
4
4
  import { Icon, IconSize, UniversalIconType } from "../icons/Icon"
5
5
 
6
6
  export interface ButtonProps extends AppearanceProps {
7
- "data-test-id"?: string
7
+ "data-testid"?: string
8
8
  ariaHidden?: boolean
9
9
  ariaLabel?: string
10
10
  children: React.ReactNode
@@ -96,7 +96,7 @@ const Button = (props: ButtonProps) => {
96
96
  aria-hidden={props.ariaHidden}
97
97
  tabIndex={props.ariaHidden ? -1 : 0}
98
98
  aria-label={props.ariaLabel}
99
- data-test-id={props.dataTestId || props["data-test-id"]}
99
+ data-testid={props.dataTestId || props["data-testid"]}
100
100
  >
101
101
  {buttonInner(props)}
102
102
  </button>
@@ -22,7 +22,7 @@ const LinkButton = (props: LinkButtonProps) => {
22
22
  <a
23
23
  href={props.href}
24
24
  className={buttonClasses.join(" ")}
25
- data-test-id={props.dataTestId}
25
+ data-testid={props.dataTestId}
26
26
  target={props.newTab ? "_blank" : "_self"}
27
27
  >
28
28
  {buttonInner(props)}
@@ -41,7 +41,7 @@ const LinkButton = (props: LinkButtonProps) => {
41
41
  aria-hidden={props.ariaHidden}
42
42
  tabIndex={props.ariaHidden ? -1 : 0}
43
43
  className={buttonClasses.join(" ")}
44
- data-test-id={props.dataTestId}
44
+ data-testid={props.dataTestId}
45
45
  >
46
46
  {buttonInner(props)}
47
47
  </LinkComponent>
@@ -41,7 +41,7 @@ const DashBlock = (props: DashBlockProps) => {
41
41
  )
42
42
  }
43
43
  return (
44
- <div className="dash-block" data-test-id={props.dataTestId}>
44
+ <div className="dash-block" data-testid={props.dataTestId}>
45
45
  {wrapper}
46
46
  </div>
47
47
  )
@@ -1,3 +1,5 @@
1
+ @import "../global/mixins.scss";
2
+
1
3
  .form-card {
2
4
  @apply bg-white;
3
5
 
@@ -70,6 +72,7 @@
70
72
 
71
73
  @screen print {
72
74
  @apply py-2;
75
+ @apply px-0;
73
76
  }
74
77
  }
75
78
 
@@ -87,11 +90,16 @@
87
90
  }
88
91
 
89
92
  .form-card__group {
90
- @apply px-8;
93
+ @screen md {
94
+ @apply px-8;
95
+ }
96
+
97
+ @screen print {
98
+ @apply px-0;
99
+ }
91
100
  }
92
101
 
93
102
  .form-card__header {
94
- @apply text-white;
95
103
  @apply text-center;
96
104
 
97
105
  @screen md {
@@ -100,7 +108,10 @@
100
108
  }
101
109
 
102
110
  .form-card__header_group {
103
- @apply flex justify-center items-center;
111
+ @apply text-white;
112
+ @apply flex;
113
+ @apply justify-center;
114
+ @apply items-center;
104
115
  @apply bg-primary;
105
116
  @apply p-4;
106
117
  @apply h-16;
@@ -112,14 +123,14 @@
112
123
  @screen print {
113
124
  @apply py-0;
114
125
  }
115
- }
116
126
 
117
- .form-card__header_title {
118
- @apply text-xl;
119
- @apply font-alt-sans;
120
- @apply font-bold;
121
- @apply uppercase;
122
- @apply mb-0;
127
+ @include headings {
128
+ @apply text-xl;
129
+ @apply font-alt-sans;
130
+ @apply font-bold;
131
+ @apply uppercase;
132
+ @apply mb-0;
133
+ }
123
134
  }
124
135
 
125
136
  .form-card__header_nav {
@@ -0,0 +1,12 @@
1
+ import React from "react"
2
+ import FormCard from "./FormCard"
3
+ import Heading from "../text/Heading"
4
+ export default {
5
+ title: "Blocks/Form Card",
6
+ }
7
+
8
+ export const defaultCard = () => (
9
+ <FormCard header={<Heading priority={1}>Header</Heading>}>Children</FormCard>
10
+ )
11
+
12
+ export const noHeader = () => <FormCard>Children</FormCard>
@@ -2,26 +2,19 @@ import * as React from "react"
2
2
  import "./FormCard.scss"
3
3
 
4
4
  export interface FormCardProps {
5
- header?: FormCardHeader
5
+ header?: React.ReactNode
6
6
  children: React.ReactNode
7
7
  className?: string
8
8
  }
9
9
 
10
- export interface FormCardHeader {
11
- isVisible: boolean
12
- title: string
13
- }
14
-
15
10
  const FormCard = (props: FormCardProps) => {
16
- const classNames = props.className ? `${props.className} form-card` : "form-card"
17
- if (props.header?.isVisible) {
11
+ const classNames = `form-card ${props.className || ""}`
12
+ if (props.header) {
18
13
  return (
19
14
  <article className={classNames}>
20
15
  <div className="form-card__header">
21
- <header className="form-card__header_group">
22
- {props.header.title && (
23
- <h1 className="form-card__header_title">{props.header.title}</h1>
24
- )}
16
+ <header className="form-card__header_group form-card__header_title">
17
+ {props.header}
25
18
  </header>
26
19
 
27
20
  <div className="form-card__header_nav">{props.children}</div>
@@ -147,7 +147,7 @@ const ImageCard = (props: ImageCardProps) => {
147
147
  ? `${props.images.length - 2} ${props.moreImagesDescription}`
148
148
  : "More Images"
149
149
  }
150
- data-test-id="open-modal-button"
150
+ data-testid="open-modal-button"
151
151
  onClick={() => {
152
152
  setShowModal(true)
153
153
  }}
@@ -50,12 +50,12 @@ const Tooltip = ({ className, id, text, children }: React.PropsWithChildren<Tool
50
50
  style={position || {}}
51
51
  role="tooltip"
52
52
  id={id}
53
- data-test-id="tooltip-element"
53
+ data-testid="tooltip-element"
54
54
  >
55
55
  {text}
56
56
  </div>
57
57
 
58
- <div className="tooltip__children" data-test-id="tooltip-children" ref={childrenWrapperRef}>
58
+ <div className="tooltip__children" data-testid="tooltip-children" ref={childrenWrapperRef}>
59
59
  {children}
60
60
  </div>
61
61
  </div>
@@ -23,14 +23,14 @@ const ViewItem = (props: ViewItemProps) => {
23
23
  if (props.truncated) valueClassName += " is-truncated"
24
24
 
25
25
  return (
26
- <div id={props.id} className={viewItemClasses.join(" ")} data-test-id={props.dataTestId}>
26
+ <div id={props.id} className={viewItemClasses.join(" ")} data-testid={props.dataTestId}>
27
27
  {props.label && (
28
28
  <span className={`view-item__label ${props.error ? "view-item__label-error" : ""}`}>
29
29
  {props.label}
30
30
  </span>
31
31
  )}
32
32
  {props.children && (
33
- <span className={valueClassName} data-test-id={props.dataTestId}>
33
+ <span className={valueClassName} data-testid={props.dataTestId}>
34
34
  {props.children}
35
35
  </span>
36
36
  )}
@@ -59,7 +59,7 @@ const Dropzone = (props: DropzoneProps) => {
59
59
  <progress className="dropzone__progress" max="100" value={props.progress}></progress>
60
60
  ) : (
61
61
  <div className={dropzoneClasses.join(" ")} {...getRootProps()}>
62
- <input id={props.id} {...getInputProps()} data-test-id={"dropzone-input"} />
62
+ <input id={props.id} {...getInputProps()} data-testid={"dropzone-input"} />
63
63
  {isDragActive ? (
64
64
  <p>{props.strings?.dropHere ?? t("t.dropFilesHere")}</p>
65
65
  ) : (
@@ -150,7 +150,7 @@ const Field = (props: FieldProps) => {
150
150
  onPaste={props.onPaste}
151
151
  onDrop={props.onDrop}
152
152
  onChange={props.onChange}
153
- data-test-id={props.dataTestId}
153
+ data-testid={props.dataTestId}
154
154
  {...inputProps}
155
155
  hidden={props.hidden}
156
156
  />
@@ -63,8 +63,8 @@ const FieldGroup = ({
63
63
  }: FieldGroupProps) => {
64
64
  // Always default align two-option radio groups side by side
65
65
  if (fields?.length === 2) {
66
- fieldGroupClassName = `${fieldGroupClassName} flex`
67
- fieldClassName = `${fieldClassName} flex-initial mr-4`
66
+ fieldGroupClassName = `${fieldGroupClassName || ""} flex`
67
+ fieldClassName = `${fieldClassName || ""} flex-initial mr-4`
68
68
  }
69
69
 
70
70
  const [checkedInputs, setCheckedInputs] = useState<string[]>([])
@@ -82,7 +82,7 @@ const FieldGroup = ({
82
82
  type={type}
83
83
  id={item.id}
84
84
  defaultValue={item.value || item.id}
85
- name={subfieldsExist() || item.uniqueName ? `${name}-${item.value}` : name}
85
+ name={subfieldsExist() || item.uniqueName ? `${name}-${item.value || ""}` : name}
86
86
  onClick={(e) => {
87
87
  // We cannot reliably target an individual checkbox in a field group since they have the same name, so we keep track on our own
88
88
  if (e.currentTarget.checked) {
@@ -95,12 +95,12 @@ const FieldGroup = ({
95
95
  disabled={item.disabled}
96
96
  ref={register(validation)}
97
97
  {...item.inputProps}
98
- data-test-id={item.dataTestId ?? dataTestId}
98
+ data-testid={item.dataTestId ?? dataTestId}
99
99
  />
100
100
  <label
101
101
  htmlFor={item.id}
102
- className={`font-semibold ${fieldLabelClassName} ${
103
- item.disabled && "text-gray-600 cursor-not-allowed"
102
+ className={`font-semibold ${fieldLabelClassName || ""} ${
103
+ item.disabled ? "text-gray-600 cursor-not-allowed" : ""
104
104
  }`}
105
105
  >
106
106
  {item.label}
@@ -150,8 +150,8 @@ const FieldGroup = ({
150
150
  {item.additionalText && checkedInputs.indexOf(item.label) >= 0 && (
151
151
  <Field
152
152
  id={item.id}
153
- key={`${item.value}-additionalText`}
154
- name={`${name}-${item.value}`}
153
+ key={`${item.value || ""}-additionalText`}
154
+ name={`${name}-${item.value || ""}`}
155
155
  register={register}
156
156
  defaultValue={item.defaultText}
157
157
  placeholder={strings?.description ?? t("t.description")}
@@ -168,12 +168,12 @@ const FieldGroup = ({
168
168
  {groupLabel && <label className="text__caps-spaced">{groupLabel}</label>}
169
169
  {groupNote && <p className="field-note mb-4">{groupNote}</p>}
170
170
 
171
- <div className={`field ${error && "error"} ${fieldGroupClassName || ""} mb-0`}>
171
+ <div className={`field ${error ? "error" : ""} ${fieldGroupClassName || ""} mb-0`}>
172
172
  {fields?.map((item) => (
173
173
  <div className={`field ${fieldClassName || ""} mb-1`} key={item.id}>
174
174
  {getInputSet(item)}
175
175
  {item.subFields && checkedInputs.indexOf(item.label) >= 0 && (
176
- <div className={"ml-8"} key={`${item.value}-subfields`}>
176
+ <div className={"ml-8"} key={`${item.value || ""}-subfields`}>
177
177
  {item.subFields?.map((subItem) => {
178
178
  return getInputSet(subItem)
179
179
  })}
@@ -27,7 +27,7 @@ const HouseholdMemberForm = (props: HouseholdMemberFormProps) => {
27
27
  className="edit-link"
28
28
  onClick={() => props.editMember && props.editMember(props.memberId)}
29
29
  type={"button"}
30
- data-test-id={"app-household-member-edit-button"}
30
+ data-testid={"app-household-member-edit-button"}
31
31
  >
32
32
  {props.strings?.edit ?? t("t.edit")}
33
33
  </button>
@@ -80,7 +80,7 @@ const MultiSelectField = (props: MultiSelectFieldProps) => {
80
80
  return (
81
81
  <div className="field multi-select-field">
82
82
  {props.label && label}
83
- <div className="control" data-test-id={props.dataTestId}>
83
+ <div className="control" data-testid={props.dataTestId}>
84
84
  <Icon symbol="search" size="medium" />
85
85
  <input
86
86
  id={props.id}
@@ -60,7 +60,7 @@ export const PhoneField = (props: {
60
60
  {props.label}
61
61
  </label>
62
62
  )}
63
- <div className={props.controlClassName} data-test-id={props.dataTestId}>
63
+ <div className={props.controlClassName} data-testid={props.dataTestId}>
64
64
  {props.mask ? (
65
65
  <Controller {...controllerProps} render={props.mask} />
66
66
  ) : (
@@ -68,7 +68,7 @@ export const PhoneField = (props: {
68
68
  )}
69
69
  </div>
70
70
  {props.subNote && <p className="field-sub-note">{props.subNote}</p>}
71
- <ErrorMessage id={`${props.id}-error`} error={props.error}>
71
+ <ErrorMessage id={`${props.id || ""}-error`} error={props.error}>
72
72
  {props.errorMessage}
73
73
  </ErrorMessage>
74
74
  </div>
@@ -60,8 +60,8 @@ export const Select = ({
60
60
  className="input"
61
61
  id={id || name}
62
62
  name={name}
63
- data-test-id={dataTestId}
64
- aria-describedby={describedBy ? describedBy : `${id}-error`}
63
+ data-testid={dataTestId}
64
+ aria-describedby={describedBy ? describedBy : `${id || name}-error`}
65
65
  aria-invalid={!!error || false}
66
66
  aria-label={label}
67
67
  ref={register && register(validation)}
@@ -79,7 +79,7 @@ export const Select = ({
79
79
  </div>
80
80
  {subNote && <p className="field-sub-note">{subNote}</p>}
81
81
  {error && errorMessage && (
82
- <ErrorMessage id={`${id}-error`} error={error}>
82
+ <ErrorMessage id={`${id || name}-error`} error={error}>
83
83
  {errorMessage}
84
84
  </ErrorMessage>
85
85
  )}
@@ -57,7 +57,7 @@ export const Textarea = (props: TextareaProps) => {
57
57
  wrap={props.wrap ?? "soft"}
58
58
  title={props.label}
59
59
  {...inputProps}
60
- data-test-id={props.dataTestId}
60
+ data-testid={props.dataTestId}
61
61
  />
62
62
  {props.note && <p className="field-note font-normal mb-2">{props.note}</p>}
63
63
  {props.errorMessage && <span className="textarea-error-message">{props.errorMessage}</span>}
@@ -199,3 +199,14 @@
199
199
  overflow: hidden;
200
200
  text-overflow: ellipsis;
201
201
  }
202
+
203
+ @mixin headings {
204
+ h1,
205
+ h2,
206
+ h3,
207
+ h4,
208
+ h5,
209
+ h6 {
210
+ @content;
211
+ }
212
+ }
@@ -52,7 +52,7 @@ const Hero = (props: HeroProps) => {
52
52
  }
53
53
 
54
54
  return (
55
- <div className={heroClasses.join(" ")} style={styles} data-test-id="hero-component">
55
+ <div className={heroClasses.join(" ")} style={styles} data-testid="hero-component">
56
56
  <div className={innerClasses.join(" ")}>
57
57
  <h1
58
58
  className={`hero__title
@@ -31,7 +31,7 @@ const PageHeader = (props: PageHeaderProps) => {
31
31
  )}
32
32
 
33
33
  {props.title && (
34
- <h1 data-test-id="page-header" className="page-header__title">
34
+ <h1 data-testid="page-header" className="page-header__title">
35
35
  {props.title}
36
36
  </h1>
37
37
  )}
@@ -157,7 +157,7 @@ const SiteHeader = (props: SiteHeaderProps) => {
157
157
  }
158
158
  dropdownOptionKeyDown(event, index)
159
159
  }}
160
- data-test-id={`${option.title}-${index}`}
160
+ data-testid={`${option.title}-${index}`}
161
161
  >
162
162
  {dropdownOptionContent(option)}
163
163
  </button>
@@ -327,7 +327,7 @@ const SiteHeader = (props: SiteHeaderProps) => {
327
327
  }`}
328
328
  href={menuLink.href}
329
329
  key={`${menuLink.title}-${index}`}
330
- data-test-id={`${menuLink.title}-${index}`}
330
+ data-testid={`${menuLink.title}-${index}`}
331
331
  >
332
332
  {menuContent}
333
333
  </LinkComponent>
@@ -367,7 +367,7 @@ const SiteHeader = (props: SiteHeaderProps) => {
367
367
  onMouseEnter={() => changeMenuShow(menuLink.title, activeMenus, setActiveMenus)}
368
368
  onMouseLeave={() => changeMenuShow(menuLink.title, activeMenus, setActiveMenus)}
369
369
  role={"button"}
370
- data-test-id={`${menuLink.title}-${index}`}
370
+ data-testid={`${menuLink.title}-${index}`}
371
371
  >
372
372
  {menuContent}
373
373
  </span>
@@ -182,8 +182,8 @@ const Icon = (props: IconProps) => {
182
182
  <span
183
183
  className={wrapperClasses.join(" ")}
184
184
  aria-hidden={props.ariaHidden}
185
- data-test-id={props.dataTestId ?? null}
186
185
  tabIndex={props.tabIndex}
186
+ data-testid={props.dataTestId ?? null}
187
187
  >
188
188
  <SpecificIcon
189
189
  fill={props.fill ? props.fill : undefined}
@@ -194,7 +194,7 @@ const Icon = (props: IconProps) => {
194
194
  <span
195
195
  className={wrapperClasses.join(" ")}
196
196
  aria-hidden={props.ariaHidden}
197
- data-test-id={props.dataTestId ?? null}
197
+ data-testid={props.dataTestId ?? null}
198
198
  style={{ color: props.fill }}
199
199
  >
200
200
  {SpecificIcon}
@@ -83,7 +83,7 @@ const AlertBox = (props: AlertBoxProps) => {
83
83
  }
84
84
 
85
85
  return showing ? (
86
- <div className={classNames} role="alert" data-test-id={"alert-box"}>
86
+ <div className={classNames} role="alert" data-testid={"alert-box"}>
87
87
  {innerSection}
88
88
  </div>
89
89
  ) : null
@@ -17,7 +17,7 @@ const ErrorMessage = (props: {
17
17
  id={props.id}
18
18
  className={classes.join(" ")}
19
19
  aria-live="assertive"
20
- data-test-id={"error-message"}
20
+ data-testid={"error-message"}
21
21
  >
22
22
  {props.children}
23
23
  </span>
@@ -12,7 +12,7 @@ const LoadingOverlay = ({ isLoading, children }: LoadingOverlayProps) => {
12
12
  if (!isLoading) return children
13
13
 
14
14
  return (
15
- <div className="loading-overlay" data-test-id="loading-overlay">
15
+ <div className="loading-overlay" data-testid="loading-overlay">
16
16
  <Icon size="3xl" symbol="spinner" className="loading-overlay__spinner" />
17
17
  {children}
18
18
  </div>
@@ -35,7 +35,7 @@ const ContentAccordion = (props: ContentAccordionProps) => {
35
35
  className={`w-full ${props.disableAccordion ? "cursor-default" : ""}`}
36
36
  ref={buttonRef}
37
37
  aria-expanded={accordionOpen}
38
- data-test-id={"content-accordion-button"}
38
+ data-testid={"content-accordion-button"}
39
39
  >
40
40
  <div
41
41
  className={`flex justify-between ${props.barClass ? props.barClass : ""} ${
@@ -210,7 +210,7 @@ const ListingCard = (props: ListingCardProps) => {
210
210
  }
211
211
 
212
212
  return (
213
- <article className="listings-row" data-test-id={"listing-card-component"}>
213
+ <article className="listings-row" data-testid={"listing-card-component"}>
214
214
  <div className="listings-row_figure">
215
215
  <ImageCard {...imageCardProps} />
216
216
  </div>
@@ -55,7 +55,7 @@ const GetApplication = (props: ApplicationsProps) => {
55
55
  if (!showSection) return null
56
56
 
57
57
  return (
58
- <section className="aside-block" data-test-id="get-application-section">
58
+ <section className="aside-block" data-testid="get-application-section">
59
59
  <Heading priority={2} styleType={"underlineWeighted"}>
60
60
  {props.strings?.howToApply ?? t("listings.apply.howToApply")}
61
61
  </Heading>
@@ -71,7 +71,7 @@ const GetApplication = (props: ApplicationsProps) => {
71
71
  {props.applicationsOpen && props.onlineApplicationURL && (
72
72
  <>
73
73
  {props.preview ? (
74
- <Button disabled className="w-full mb-2" data-test-id={"listing-view-apply-button"}>
74
+ <Button disabled className="w-full mb-2" data-testid={"listing-view-apply-button"}>
75
75
  {props.strings?.applyOnline ?? t("listings.apply.applyOnline")}
76
76
  </Button>
77
77
  ) : (
@@ -105,7 +105,7 @@ const FormSignIn = ({
105
105
  />
106
106
 
107
107
  <div className="text-center mt-6">
108
- <Button styleType={AppearanceStyleType.primary} data-test-id="sign-in-button">
108
+ <Button styleType={AppearanceStyleType.primary} data-testid="sign-in-button">
109
109
  {t("nav.signIn")}
110
110
  </Button>
111
111
  </div>
@@ -73,7 +73,7 @@ const FormSignInAddPhone = ({
73
73
  <div className="text-center mt-10">
74
74
  <Button
75
75
  styleType={AppearanceStyleType.primary}
76
- data-test-id="request-mfa-code-and-add-phone"
76
+ data-testid="request-mfa-code-and-add-phone"
77
77
  >
78
78
  {t("nav.signInMFA.addPhoneNumber")}
79
79
  </Button>