@bloom-housing/ui-components 5.1.1-alpha.32 → 5.1.1-alpha.33

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [5.1.1-alpha.33](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.32...@bloom-housing/ui-components@5.1.1-alpha.33) (2022-09-26)
7
+
8
+ **Note:** Version bump only for package @bloom-housing/ui-components
9
+
10
+
11
+
12
+
13
+
6
14
  ## [5.1.1-alpha.32](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@5.1.1-alpha.31...@bloom-housing/ui-components@5.1.1-alpha.32) (2022-09-26)
7
15
 
8
16
  **Note:** Version bump only for package @bloom-housing/ui-components
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bloom-housing/ui-components",
3
- "version": "5.1.1-alpha.32",
3
+ "version": "5.1.1-alpha.33",
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/bloom/tree/master/shared/ui-components",
@@ -110,5 +110,5 @@
110
110
  "ts-jest": "^26.4.1",
111
111
  "typesafe-actions": "^5.1.0"
112
112
  },
113
- "gitHead": "aaf1c58cff9deb90a1750ea50cde3963b101f287"
113
+ "gitHead": "49fab2b65922da37be56844bdca2272066be45c4"
114
114
  }
@@ -44,6 +44,8 @@ const DOBField = (props: DOBFieldProps) => {
44
44
  return [name, baseName].filter((item) => item).join(".")
45
45
  }
46
46
 
47
+ const hasError = error?.birthMonth || error?.birthDay || error?.birthYear
48
+
47
49
  const birthDay = watch(getFieldName("birthDay")) ?? defaultDOB?.birthDay
48
50
  const birthMonth = watch(getFieldName("birthMonth")) ?? defaultDOB?.birthMonth
49
51
 
@@ -56,6 +58,7 @@ const DOBField = (props: DOBFieldProps) => {
56
58
 
57
59
  const labelClasses = ["field-label--caps"]
58
60
  if (props.readerOnly) labelClasses.push("sr-only")
61
+ if (hasError) labelClasses.push("text-alert")
59
62
 
60
63
  return (
61
64
  <fieldset id={id}>
@@ -132,7 +135,7 @@ const DOBField = (props: DOBFieldProps) => {
132
135
  />
133
136
  </div>
134
137
 
135
- {(error?.birthMonth || error?.birthDay || error?.birthYear) && (
138
+ {hasError && (
136
139
  <div className="field error">
137
140
  <span id={`${id}-error`} className="error-message">
138
141
  {errorMessage ? errorMessage : props.strings?.dateError ?? t("errors.dateOfBirthError")}
@@ -81,6 +81,7 @@ const Field = (props: FieldProps) => {
81
81
  if (props.type === "radio") {
82
82
  labelClasses.push("font-semibold")
83
83
  }
84
+ if (props.error) labelClasses.push("text-alert")
84
85
 
85
86
  return (
86
87
  <label className={labelClasses.join(" ")} htmlFor={props.id || props.name}>
@@ -61,7 +61,7 @@ const FieldGroup = ({
61
61
  dataTestId,
62
62
  strings,
63
63
  }: FieldGroupProps) => {
64
- // Always align two-option radio groups side by side
64
+ // Always default align two-option radio groups side by side
65
65
  if (fields?.length === 2) {
66
66
  fieldGroupClassName = `${fieldGroupClassName} flex`
67
67
  fieldClassName = `${fieldClassName} flex-initial mr-4`
@@ -66,7 +66,7 @@ const HouseholdSizeField = (props: HouseholdSizeFieldProps) => {
66
66
  <ErrorMessage
67
67
  id={"householdsize-error"}
68
68
  error={!!error}
69
- className="block mt-0 line-normal text-red-700"
69
+ className="block mt-0 line-normal text-alert"
70
70
  >
71
71
  <AlertBox type="alert" inverted onClose={() => clearErrors()}>
72
72
  {strings?.dontQualifyHeader ?? t("application.household.dontQualifyHeader")}
@@ -230,7 +230,7 @@
230
230
 
231
231
  &.error {
232
232
  label {
233
- @apply text-red-700;
233
+ @apply text-alert;
234
234
  }
235
235
 
236
236
  .control {
@@ -242,7 +242,7 @@
242
242
  }
243
243
 
244
244
  .prepend {
245
- @apply text-red-700;
245
+ @apply text-alert;
246
246
  }
247
247
  }
248
248
 
@@ -355,17 +355,16 @@ input[type="number"] {
355
355
  .field-note {
356
356
  @apply text-tiny;
357
357
  @apply text-gray-700;
358
- @apply font-semibold;
359
358
  white-space: pre-line;
360
359
  }
361
360
 
362
361
  .error-message {
363
362
  display: inline-block;
364
363
  @apply text-sm;
365
- @apply text-red-700;
364
+ @apply text-alert;
366
365
  @apply tracking-wide;
367
366
  @apply leading-5;
368
- @apply mt-2;
367
+ @apply mt-1;
369
368
  }
370
369
 
371
370
  .field-sub-note {
@@ -12,7 +12,7 @@
12
12
  --warn-invert-background-color: var(--bloom-color-warn);
13
13
  --text-color: var(--bloom-color-gray-900);
14
14
  --close-icon-color: var(--bloom-color-gray-900);
15
- --font-weight: 600;
15
+ --font-weight: 500;
16
16
  --max-width: var(--bloom-width-5xl);
17
17
  --line-height: 1.375;
18
18
 
@@ -27,7 +27,7 @@ const FormSignInErrorBox = ({ networkStatus, errors, errorMessageId }: FormSignI
27
27
  <ErrorMessage
28
28
  id={`form-sign-in-${errorMessageId}-error`}
29
29
  error={!!networkStatus.content}
30
- className="block mt-0 leading-normal text-red-700"
30
+ className="block mt-0 leading-normal text-alert"
31
31
  >
32
32
  <AlertBox type={"alert"} inverted onClose={() => networkStatus.reset()}>
33
33
  {networkStatus.content.title}