@bloom-housing/ui-components 6.0.1-alpha.2 → 6.0.1-alpha.3

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 (37) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/index.ts +1 -1
  3. package/package.json +5 -2
  4. package/src/actions/Button.scss +1 -1
  5. package/src/blocks/ImageCard.scss +1 -1
  6. package/src/blocks/StandardCard.scss +1 -1
  7. package/src/blocks/StandardCard.tsx +1 -1
  8. package/src/documentation/Utilities.scss +30 -0
  9. package/src/documentation/Utilities.stories.mdx +25 -0
  10. package/src/documentation/Utilities.tsx +67 -0
  11. package/src/forms/DOBField.tsx +1 -1
  12. package/src/forms/Field.tsx +1 -1
  13. package/src/forms/FieldGroup.tsx +1 -1
  14. package/src/forms/MultiSelectField.scss +2 -2
  15. package/src/forms/PhoneField.tsx +1 -1
  16. package/src/global/forms.scss +3 -15
  17. package/src/global/mixins.scss +2 -2
  18. package/src/global/text.scss +81 -63
  19. package/src/global/tokens/colors.scss +1 -0
  20. package/src/headers/HeadingGroup.tsx +1 -1
  21. package/src/navigation/ProgressNav.scss +1 -1
  22. package/src/page_components/listing/ListingCard.tsx +6 -6
  23. package/src/page_components/listing/ListingMap.tsx +2 -2
  24. package/src/page_components/listing/listing_sidebar/Contact.tsx +3 -3
  25. package/src/page_components/listing/listing_sidebar/ExpandableSection.tsx +4 -1
  26. package/src/page_components/listing/listing_sidebar/GetApplication.tsx +6 -5
  27. package/src/page_components/listing/listing_sidebar/QuantityRowSection.tsx +4 -1
  28. package/src/page_components/listing/listing_sidebar/ReferralApplication.tsx +4 -1
  29. package/src/page_components/listing/listing_sidebar/SidebarBlock.tsx +3 -3
  30. package/src/page_components/listing/listing_sidebar/SubmitApplication.tsx +4 -4
  31. package/src/page_components/listing/listing_sidebar/events/EventSection.tsx +5 -2
  32. package/src/sections/InfoCardGrid.tsx +2 -2
  33. package/src/tables/CategoryTable.tsx +2 -2
  34. package/src/text/Heading.docs.mdx +18 -0
  35. package/src/{headers → text}/Heading.tsx +9 -9
  36. package/src/text/Tag.scss +1 -1
  37. package/tailwind.config.js +1 -0
package/CHANGELOG.md CHANGED
@@ -3,6 +3,22 @@
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
+ ## [6.0.1-alpha.3](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@6.0.1-alpha.2...@bloom-housing/ui-components@6.0.1-alpha.3) (2022-10-03)
7
+
8
+
9
+ ### Code Refactoring
10
+
11
+ * organize design system text styles ([#3055](https://github.com/bloom-housing/bloom/issues/3055)) ([f5bcb62](https://github.com/bloom-housing/bloom/commit/f5bcb629885fd9ce6c17e3e817bd0ee500373990))
12
+
13
+
14
+ ### BREAKING CHANGES
15
+
16
+ * the different style types you can pass to the heading component have individually been renamed to fit the design system, as well as the prop to pass them in
17
+
18
+
19
+
20
+
21
+
6
22
  ## [6.0.1-alpha.2](https://github.com/bloom-housing/bloom/compare/@bloom-housing/ui-components@6.0.1-alpha.1...@bloom-housing/ui-components@6.0.1-alpha.2) (2022-09-29)
7
23
 
8
24
 
package/index.ts CHANGED
@@ -55,7 +55,6 @@ export * from "./src/headers/Hero"
55
55
  export * from "./src/headers/PageHeader"
56
56
  export * from "./src/headers/SiteHeader"
57
57
  export * from "./src/headers/StepHeader"
58
- export * from "./src/headers/Heading"
59
58
  export * from "./src/headers/HeadingGroup"
60
59
 
61
60
  /* Helpers */
@@ -164,5 +163,6 @@ export * from "./src/tables/AgPagination"
164
163
 
165
164
  /* Text */
166
165
  export * from "./src/text/Description"
166
+ export * from "./src/text/Heading"
167
167
  export * from "./src/text/Message"
168
168
  export * from "./src/text/Tag"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bloom-housing/ui-components",
3
- "version": "6.0.1-alpha.2",
3
+ "version": "6.0.1-alpha.3",
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",
@@ -43,6 +43,7 @@
43
43
  "@types/dompurify": "^2.3.3",
44
44
  "@types/jest": "^26.0.14",
45
45
  "@types/jwt-decode": "^2.2.1",
46
+ "@types/pretty": "2.0.1",
46
47
  "@types/react-map-gl": "^5.2.10",
47
48
  "@types/react-tabs": "^2.3.2",
48
49
  "@types/react-test-renderer": "^16.9.3",
@@ -57,7 +58,9 @@
57
58
  "postcss": "^8.3.6",
58
59
  "postcss-loader": "^4.3",
59
60
  "preact": "^10.5.14",
61
+ "pretty": "2.0.0",
60
62
  "puppeteer": "^10.1.0",
63
+ "react-dom-server": "0.0.5",
61
64
  "react-is": "^17.0.2",
62
65
  "react-test-renderer": "^17.0.2",
63
66
  "regenerator-runtime": "^0.13.7",
@@ -110,5 +113,5 @@
110
113
  "ts-jest": "^26.4.1",
111
114
  "typesafe-actions": "^5.1.0"
112
115
  },
113
- "gitHead": "2a2bd0fb61d7643c31d4a200b96a78d401bd0590"
116
+ "gitHead": "4e7935694f2d0551656828a64d487d2419c29ef4"
114
117
  }
@@ -54,7 +54,7 @@
54
54
 
55
55
  &.is-secondary {
56
56
  border-color: var(--bloom-color-gray-700);
57
- color: var(--bloom-color-gray-700);
57
+ color: var(--bloom-text-color-light);
58
58
 
59
59
  &:hover {
60
60
  background-color: var(--bloom-color-gray-700);
@@ -150,7 +150,7 @@
150
150
  }
151
151
 
152
152
  .modal.image-card__gallery-modal {
153
- --title-color: var(--bloom-color-gray-750);
153
+ --title-color: var(--bloom-text-color);
154
154
  --background-color: transparent;
155
155
  --content-padding-block: var(--bloom-s2) var(--bloom-s4);
156
156
  --footer-background-color: transparent;
@@ -5,7 +5,7 @@
5
5
  --border-color: var(--bloom-color-gray-500);
6
6
  --title-color: var(--bloom-color-gray-900);
7
7
  --background-color: var(--bloom-color-white);
8
- --blank-color: var(--bloom-color-gray-750);
8
+ --blank-color: var(--bloom-text-color);
9
9
  --blank-background: var(--bloom-color-gray-200);
10
10
  }
11
11
 
@@ -1,5 +1,5 @@
1
1
  import React from "react"
2
- import { Heading } from "../headers/Heading"
2
+ import { Heading } from "../text/Heading"
3
3
  import "./StandardCard.scss"
4
4
 
5
5
  export interface StandardCardProps {
@@ -0,0 +1,30 @@
1
+ .mdx-table {
2
+ width: 100%;
3
+ table-layout: auto;
4
+ white-space: nowrap;
5
+ margin-top: var(--bloom-s8);
6
+ font-size: var(--bloom-font-size-tiny);
7
+
8
+ tr {
9
+ padding: var(--bloom-s4);
10
+ background-color: var(--bloom-color-white) !important;
11
+ }
12
+
13
+ th {
14
+ background-color: var(--bloom-color-primary-lighter);
15
+ text-transform: uppercase;
16
+ font-weight: 700;
17
+ color: var(--bloom-text-color-darker);
18
+ letter-spacing: var(--bloom-letter-spacing-wide);
19
+ }
20
+
21
+ td:not(:first-child) {
22
+ width: 100%;
23
+ }
24
+
25
+ td,
26
+ th {
27
+ padding: var(--bloom-s2) var(--bloom-s4) var(--bloom-s2) var(--bloom-s4);
28
+ border: 1px solid var(--bloom-color-gray-450);
29
+ }
30
+ }
@@ -0,0 +1,25 @@
1
+ import { Canvas, Story, Meta, DocsContainer, Source } from "@storybook/addon-docs"
2
+ import { LargeHeader, LargeHeaderSource, Typography } from "./Utilities"
3
+
4
+ <Meta
5
+ title="Documentation/Utilities"
6
+ parameters={{
7
+ docs: {
8
+ container: ({ children, context }) => (
9
+ <DocsContainer context={context}>
10
+ <div>{children}</div>
11
+ </DocsContainer>
12
+ ),
13
+ },
14
+ }}
15
+ />
16
+
17
+ # Utilities
18
+
19
+ These styles are component agnostic and can be used to ensure UI consistency across the application.
20
+
21
+ ## Typography
22
+
23
+ These classes can be added to any text element in order to give it visual identity and hierarchy.
24
+
25
+ <Typography />
@@ -0,0 +1,67 @@
1
+ import * as React from "react"
2
+ import "./Utilities.scss"
3
+
4
+ interface CustomMdxTableProps {
5
+ data: (string | React.ReactNode)[][]
6
+ headers: (string | React.ReactNode)[]
7
+ }
8
+
9
+ const CustomMdxTable = (props: CustomMdxTableProps) => {
10
+ return (
11
+ <table className={"mdx-table"}>
12
+ {props.headers.length > 0 && (
13
+ <tr>
14
+ {props.headers.map((header) => {
15
+ return <th align="left">{header}</th>
16
+ })}
17
+ </tr>
18
+ )}
19
+
20
+ {props.data.map((row) => {
21
+ return (
22
+ <tr>
23
+ {row.map((cell) => {
24
+ return <td>{cell}</td>
25
+ })}
26
+ </tr>
27
+ )
28
+ })}
29
+ </table>
30
+ )
31
+ }
32
+
33
+ export const Typography = () => {
34
+ return (
35
+ <CustomMdxTable
36
+ headers={["Class", "Example"]}
37
+ data={[
38
+ [
39
+ "text__large-primary",
40
+ <div className={"text__large-primary"}>Large Primary Text Style</div>,
41
+ ],
42
+ [
43
+ "text__medium-normal",
44
+ <div className={"text__medium-normal"}>Medium Normal Text Style</div>,
45
+ ],
46
+ [
47
+ "text__small-weighted",
48
+ <div className={"text__small-weighted"}>Small Weighted Text Style</div>,
49
+ ],
50
+ ["text__small-normal", <div className={"text__small-normal"}>Small Normal Text Style</div>],
51
+ [
52
+ "text__underline-weighted",
53
+ <div className={"text__underline-weighted"}>Underline Weighted Text Style</div>,
54
+ ],
55
+ [
56
+ "text__light-weighted",
57
+ <div className={"text__light-weighted"}>Light Weighted Text Style</div>,
58
+ ],
59
+ [
60
+ "text__caps-weighted",
61
+ <div className={"text__caps-weighted"}>Caps Weighted Text Style</div>,
62
+ ],
63
+ ["text_caps-spaced", <div className={"text_caps-spaced"}>Caps Spaced Text Style</div>],
64
+ ]}
65
+ />
66
+ )
67
+ }
@@ -56,7 +56,7 @@ const DOBField = (props: DOBFieldProps) => {
56
56
  )
57
57
  }
58
58
 
59
- const labelClasses = ["field-label--caps"]
59
+ const labelClasses = ["text_caps-spaced"]
60
60
  if (props.readerOnly) labelClasses.push("sr-only")
61
61
  if (hasError) labelClasses.push("text-alert")
62
62
 
@@ -75,7 +75,7 @@ const Field = (props: FieldProps) => {
75
75
 
76
76
  const label = useMemo(() => {
77
77
  const labelClasses = ["label"]
78
- if (props.caps) labelClasses.push("field-label--caps")
78
+ if (props.caps) labelClasses.push("text_caps-spaced")
79
79
  if (props.primary) labelClasses.push("text-primary")
80
80
  if (props.readerOnly) labelClasses.push("sr-only")
81
81
  if (props.type === "radio") {
@@ -165,7 +165,7 @@ const FieldGroup = ({
165
165
  }
166
166
  return (
167
167
  <div>
168
- {groupLabel && <label className="field-label--caps">{groupLabel}</label>}
168
+ {groupLabel && <label className="text_caps-spaced">{groupLabel}</label>}
169
169
  {groupNote && <p className="field-note mb-4">{groupNote}</p>}
170
170
 
171
171
  <div className={`field ${error && "error"} ${fieldGroupClassName || ""} mb-0`}>
@@ -82,7 +82,7 @@
82
82
  width: 100%;
83
83
  padding: var(--bloom-s1) var(--bloom-s2);
84
84
  font-size: var(--bloom-font-size-sm);
85
- color: var(--bloom-color-gray-750);
85
+ color: var(--bloom-text-color);
86
86
  text-align: right;
87
87
  }
88
88
 
@@ -126,7 +126,7 @@
126
126
 
127
127
  .multi-select-field__option--no-results,
128
128
  .multi-select-field__option[aria-disabled="true"] {
129
- color: var(--bloom-color-gray-750) !important;
129
+ color: var(--bloom-text-color) !important;
130
130
  cursor: not-allowed !important;
131
131
  text-decoration: none !important;
132
132
  }
@@ -22,7 +22,7 @@ export const PhoneField = (props: {
22
22
  dataTestId?: string
23
23
  }) => {
24
24
  const labelClasses = ["label"]
25
- if (props.caps) labelClasses.push("field-label--caps")
25
+ if (props.caps) labelClasses.push("text_caps-spaced")
26
26
  if (props.readerOnly) labelClasses.push("sr-only")
27
27
  /**
28
28
  * we need to handle two different use cases,
@@ -23,7 +23,7 @@
23
23
  }
24
24
 
25
25
  label.sr-only + .control,
26
- label.field-label--caps + .control {
26
+ label.text_caps-spaced + .control {
27
27
  @apply mt-0;
28
28
  }
29
29
 
@@ -31,7 +31,7 @@
31
31
  @apply mt-2;
32
32
  }
33
33
 
34
- .field-label--caps.label + .field-note {
34
+ .text_caps-spaced.label + .field-note {
35
35
  @apply mt-0;
36
36
  }
37
37
 
@@ -256,10 +256,9 @@
256
256
  }
257
257
  }
258
258
 
259
- /* Restore previous Tailwind v1 color */
260
259
  input::placeholder,
261
260
  textarea::placeholder {
262
- color: #a0aec0;
261
+ color: var(--bloom-color-gray-650);
263
262
  }
264
263
 
265
264
  input[type],
@@ -298,17 +297,6 @@ input[type="number"] {
298
297
  @apply text-gray-800;
299
298
  }
300
299
 
301
- .field-label--caps {
302
- @apply font-sans;
303
- @apply uppercase;
304
- @apply text-gray-750;
305
- @apply tracking-widest;
306
- @apply font-semibold;
307
- @apply text-tiny;
308
- @apply mb-3;
309
- @apply inline-block;
310
- }
311
-
312
300
  .field--inline {
313
301
  display: inline-block;
314
302
  }
@@ -116,7 +116,7 @@
116
116
  &.is-warning {
117
117
  background-color: var(--warning-appearance-background-color, var(--bloom-color-warn));
118
118
  border-color: var(--warning-appearance-border-color, var(--bloom-color-warn));
119
- color: var(--warning-appearance-label-color, var(--bloom-color-gray-800));
119
+ color: var(--warning-appearance-label-color, var(--bloom-text-color-dark));
120
120
 
121
121
  &:hover {
122
122
  background-color: var(
@@ -176,7 +176,7 @@
176
176
  }
177
177
 
178
178
  &.is-warning {
179
- color: var(--bloom-color-gray-800);
179
+ color: var(--bloom-text-color-dark);
180
180
 
181
181
  &:hover {
182
182
  color: var(--bloom-color-white);
@@ -72,31 +72,6 @@ h1.title {
72
72
  @apply text-4xl;
73
73
  }
74
74
 
75
- .text-caps-underline {
76
- @apply font-alt-sans;
77
- @apply uppercase;
78
- @apply text-tiny;
79
- @apply mb-5;
80
- @apply pb-2;
81
- @apply border-0;
82
- @apply border-b-4;
83
- @apply border-primary;
84
- @apply font-semibold;
85
- @apply text-gray-800;
86
- @apply tracking-widest;
87
- @apply inline-block;
88
- }
89
-
90
- .text-caps-tiny {
91
- @apply mb-3;
92
- @apply text-gray-750;
93
- @apply uppercase;
94
- @apply font-sans;
95
- @apply font-bold;
96
- @apply text-tiny;
97
- @apply tracking-wide;
98
- }
99
-
100
75
  .text-serif-lg {
101
76
  @apply font-serif;
102
77
  @apply text-lg;
@@ -140,42 +115,85 @@ h1.title {
140
115
  @apply block;
141
116
  }
142
117
 
143
- .card-header {
144
- font-family: var(--card-header-font-family, var(--bloom-font-alt-sans));
145
- font-weight: var(--card-header-font-weight, 600);
146
- color: var(--card-header-color, var(--bloom-color-blue-700));
147
- font-size: var(--card-header-font-size, var(--bloom-font-size-3xl));
148
- margin-block: var(--card-header-margin-block, 0 var(--bloom-s3));
149
- line-height: var(--card-header-line-height, var(--bloom-line-height-tight));
150
- }
151
-
152
- .card-subheader {
153
- font-family: var(--card-subheader-font-family, var(--bloom-font-alt-sans));
154
- font-weight: var(--card-subheader-font-weight, normal);
155
- color: var(--card-subheader-color, var(--bloom-color-black));
156
- font-size: var(--card-subheader-font-size, var(--bloom-font-size-base));
157
- margin-block: var(--card-subheader-margin-block, 0 var(--bloom-s3));
158
- }
159
-
160
- .table-header {
161
- font-family: var(--table-header-font-family, var(--bloom-font-alt-sans));
162
- font-weight: var(--table-header-font-weight, 600);
163
- color: var(--table-header-color, var(--bloom-color-gray-800));
164
- font-size: var(--table-header-font-size, var(--bloom-font-size-sm));
165
- margin-block: var(--table-header-margin-block, 0 var(--bloom-s1));
166
- }
167
-
168
- .table-subheader {
169
- font-family: var(--table-subheader-font-family, var(--bloom-font-alt-sans));
170
- font-weight: var(--table-subheader-font-weight, normal);
171
- color: var(--table-subheader-color, var(--bloom-color-gray-750));
172
- font-size: var(--table-subheader-font-size, var(--bloom-font-size-sm));
173
- margin-block: var(--table-header-margin-block, 0 var(--bloom-s3));
174
- }
175
-
176
- .category-header {
177
- font-family: var(--category-header-font-family, var(--bloom-font-alt-sans));
178
- font-weight: var(--category-header-font-weight, 600);
179
- color: var(--category-header-color, var(--bloom-color-gray-700));
180
- font-size: var(--category-header-font-size, var(--bloom-font-size-sm));
118
+ :root {
119
+ --bloom-text-color-light: var(--bloom-color-gray-700);
120
+ --bloom-text-color: var(--bloom-color-gray-750);
121
+ --bloom-text-color-dark: var(--bloom-color-gray-800);
122
+ --bloom-text-color-darker: var(--bloom-color-gray-850);
123
+ --bloom-text-color-darkest: var(--bloom-color-black);
124
+ }
125
+
126
+ .text__large-primary {
127
+ font-family: var(--text-large-primary-font-family, var(--bloom-font-alt-sans));
128
+ font-weight: var(--text-large-primary-font-weight, 600);
129
+ color: var(--text-large-primary--color, var(--bloom-color-primary-dark));
130
+ font-size: var(--text-large-primary-font-size, var(--bloom-font-size-3xl));
131
+ margin-block: var(--text-large-primary-margin-block, 0 var(--bloom-s3));
132
+ line-height: var(--text-large-primary-line-height, var(--bloom-line-height-tight));
133
+ }
134
+
135
+ .text__medium-normal {
136
+ font-family: var(--text-medium-normal-font-family, var(--bloom-font-alt-sans));
137
+ font-weight: var(--text-medium-normal-font-weight, normal);
138
+ color: var(--text-medium-normal-color, var(--bloom-text-color-darkest));
139
+ font-size: var(--text-medium-normal-font-size, var(--bloom-font-size-base));
140
+ margin-block: var(--text-medium-normal-margin-block, 0 var(--bloom-s3));
141
+ }
142
+
143
+ .text__small-weighted {
144
+ font-family: var(--text-small-weighted-font-family, var(--bloom-font-alt-sans));
145
+ font-weight: var(--text-small-weighted-font-weight, 600);
146
+ color: var(--text-small-weighted-color, var(--bloom-text-color-dark));
147
+ font-size: var(--text-small-weighted-font-size, var(--bloom-font-size-sm));
148
+ margin-block: var(--text-small-weighted-margin-block, 0 var(--bloom-s1));
149
+ }
150
+
151
+ .text__small-normal {
152
+ font-family: var(--text-small-normal-font-family, var(--bloom-font-alt-sans));
153
+ font-weight: var(--text-small-normal-font-weight, normal);
154
+ color: var(--text-small-normal-color, var(--bloom-text-color));
155
+ font-size: var(--text-small-normal-font-size, var(--bloom-font-size-sm));
156
+ margin-block: var(--text-small-normal-margin-block, 0 var(--bloom-s3));
157
+ }
158
+
159
+ .text__light-weighted {
160
+ font-family: var(--text-light-weighted-font-family, var(--bloom-font-alt-sans));
161
+ font-weight: var(--text-light-weighted-font-weight, 600);
162
+ color: var(--text-light-weighted-color, var(--bloom-text-color-light));
163
+ font-size: var(--text-light-weighted-font-size, var(--bloom-font-size-sm));
164
+ }
165
+
166
+ .text_caps-spaced {
167
+ font-family: var(--text-caps-spaced-font-family, var(--bloom-font-sans));
168
+ text-transform: uppercase;
169
+ color: var(--text-caps-spaced-color, var(--bloom-text-color));
170
+ letter-spacing: var(--text-caps-spaced-letter-spacing, var(--bloom-letter-spacing-widest));
171
+ font-weight: var(--text-caps-spaced-font-weight, 600);
172
+ font-size: var(--text-caps-spaced-font-size, var(--bloom-font-size-tiny));
173
+ margin-bottom: var(--text-caps-spaced-margin-bottom, var(--bloom-s3));
174
+ display: inline-block;
175
+ }
176
+
177
+ .text__underline-weighted {
178
+ font-family: var(--text-underline-weighted-font-family, var(--bloom-font-alt-sans));
179
+ text-transform: var(--text-underline-weighted-transform, uppercase);
180
+ font-size: var(--text-underline-weighted-font-size, var(--bloom-font-size-tiny));
181
+ margin-bottom: var(--text-underline-weighted-bottom-margin, var(--bloom-s5));
182
+ padding-bottom: var(--text-underline-weighted-bottom-padding, var(--bloom-s2));
183
+ border: var(--text-underline-weighted-border, 0);
184
+ border-bottom: var(--text-underline-weighted-border, 4px solid var(--bloom-color-primary));
185
+ font-weight: var(--text-underline-weighted-font-weight, 600);
186
+ color: var(--text-underline-weighted-color, var(--bloom-text-color-dark));
187
+ letter-spacing: var(--text-underline-weighted-letter-spacing, var(--bloom-letter-spacing-widest));
188
+ display: inline-block;
189
+ }
190
+
191
+ .text__caps-weighted {
192
+ margin-bottom: var(--text-caps-weighted-bottom-margin, var(--bloom-s3));
193
+ color: var(--text-caps-weighted-color, var(--bloom-text-color));
194
+ text-transform: var(--text-caps-weighted-text-transform, uppercase);
195
+ font-family: var(--text-caps-weighted-font-family, var(--bloom-font-sans));
196
+ font-weight: var(--text-caps-weighted-font-weight, 700);
197
+ font-size: var(--text-caps-weighted-font-size, var(--bloom-font-size-tiny));
198
+ letter-spacing: var(--text-caps-weighted-letter-spacing, var(--bloom-letter-spacing-wide));
181
199
  }
@@ -26,6 +26,7 @@
26
26
  --bloom-color-gray-800: #30383a;
27
27
  --bloom-color-gray-750: #555555;
28
28
  --bloom-color-gray-700: #767676;
29
+ --bloom-color-gray-650: #888888;
29
30
  --bloom-color-gray-600: #999999;
30
31
  --bloom-color-gray-550: #aaaaaa;
31
32
  --bloom-color-gray-500: #cccccc;
@@ -1,5 +1,5 @@
1
1
  import React from "react"
2
- import { Heading } from "./Heading"
2
+ import { Heading } from "../text/Heading"
3
3
  import "./HeadingGroup.scss"
4
4
 
5
5
  export interface HeadingGroupProps {
@@ -4,7 +4,7 @@
4
4
  --active-step-color: var(--bloom-color-primary);
5
5
  --active-step-font-color: var(--bloom-color-gray-900);
6
6
  --future-step-color: var(--bloom-color-gray-450);
7
- --future-step-font-color: var(--bloom-color-gray-750);
7
+ --future-step-font-color: var(--bloom-text-color);
8
8
 
9
9
  --dot-size: var(--bloom-s3);
10
10
  --dot-padding-left-mobile: var(--bloom-s2);
@@ -3,7 +3,7 @@ import { ImageCard, ImageCardProps, ImageTag } from "../../blocks/ImageCard"
3
3
  import { LinkButton } from "../../actions/LinkButton"
4
4
  import { StackedTable, StackedTableProps } from "../../tables/StackedTable"
5
5
  import { StandardTable, StandardTableProps } from "../../tables/StandardTable"
6
- import { Heading, HeaderType } from "../../headers/Heading"
6
+ import { Heading, HeaderType } from "../../text/Heading"
7
7
  import { Tag } from "../../text/Tag"
8
8
  import { AppearanceShadeType, AppearanceStyleType } from "../../global/AppearanceTypes"
9
9
  import { Icon, IconFillColors } from "../../icons/Icon"
@@ -94,7 +94,7 @@ const ListingCard = (props: ListingCardProps) => {
94
94
  )
95
95
  }
96
96
  return (
97
- <Heading priority={priority} style={styleType} className={customClass}>
97
+ <Heading priority={priority} styleType={styleType} className={customClass}>
98
98
  {header.href ? (
99
99
  <LinkComponent className="is-card-link" href={header.href}>
100
100
  {header.content}
@@ -112,8 +112,8 @@ const ListingCard = (props: ListingCardProps) => {
112
112
  const getContentHeader = () => {
113
113
  return (
114
114
  <div className="listings-row_headers">
115
- {getHeader(contentProps?.contentHeader, 2, "cardHeader", "order-1")}
116
- {getHeader(contentProps?.contentSubheader, 3, "cardSubheader", "order-2")}
115
+ {getHeader(contentProps?.contentHeader, 2, "largePrimary", "order-1")}
116
+ {getHeader(contentProps?.contentSubheader, 3, "mediumNormal", "order-2")}
117
117
  {cardTags && cardTags?.length > 0 && (
118
118
  <div className="listings-row_tags">
119
119
  {cardTags?.map((cardTag, index) => {
@@ -145,8 +145,8 @@ const ListingCard = (props: ListingCardProps) => {
145
145
  <hr className={"mb-2"} />
146
146
  )}
147
147
  <div className={"listings-row_headers"}>
148
- {getHeader(contentProps?.tableHeader, 4, "tableHeader")}
149
- {getHeader(contentProps?.tableSubheader, 5, "tableSubheader")}
148
+ {getHeader(contentProps?.tableHeader, 4, "smallWeighted")}
149
+ {getHeader(contentProps?.tableSubheader, 5, "smallNormal")}
150
150
  </div>
151
151
  {children && children}
152
152
  {tableProps && (tableProps.data || tableProps.stackedData) && (
@@ -5,7 +5,7 @@ import MapGL, { Marker } from "react-map-gl"
5
5
  import "./ListingMap.scss"
6
6
  import { MultiLineAddress, Address } from "../../helpers/MultiLineAddress"
7
7
  import { useIntersect } from "../../.."
8
- import { Heading } from "../../headers/Heading"
8
+ import { Heading } from "../../text/Heading"
9
9
 
10
10
  export interface ListingMapProps {
11
11
  address?: Address
@@ -109,7 +109,7 @@ const ListingMap = (props: ListingMapProps) => {
109
109
  <div className="listing-map" ref={setIntersectingElement}>
110
110
  <div className="addressPopup">
111
111
  {props.listingName && (
112
- <Heading priority={3} style={"sidebarSubHeader"}>
112
+ <Heading priority={3} styleType={"capsWeighted"}>
113
113
  {props.listingName}
114
114
  </Heading>
115
115
  )}
@@ -2,7 +2,7 @@ import * as React from "react"
2
2
  import { ContactAddress } from "./ContactAddress"
3
3
  import { Icon, IconFillColors } from "../../../icons/Icon"
4
4
  import { Address } from "../../../helpers/MultiLineAddress"
5
- import { Heading } from "../../../headers/Heading"
5
+ import { Heading } from "../../../text/Heading"
6
6
 
7
7
  export interface ContactProps {
8
8
  /** Any number of text sections rendered after the contact information */
@@ -49,7 +49,7 @@ const Contact = ({
49
49
 
50
50
  return (
51
51
  <section className="aside-block">
52
- <Heading priority={4} style={"sidebarHeader"}>
52
+ <Heading priority={4} styleType={"underlineWeighted"}>
53
53
  {sectionTitle}
54
54
  </Heading>
55
55
 
@@ -96,7 +96,7 @@ const Contact = ({
96
96
  {additionalInformation?.map((info) => {
97
97
  return (
98
98
  <div key={info.title} className={"my-3"}>
99
- <Heading priority={3} style={"sidebarSubHeader"}>
99
+ <Heading priority={3} styleType={"capsWeighted"}>
100
100
  {info.title}
101
101
  </Heading>
102
102
  <div className="text-gray-800 text-tiny markdown">{info.content}</div>
@@ -1,6 +1,7 @@
1
1
  import * as React from "react"
2
2
  import Markdown from "markdown-to-jsx"
3
3
  import { ExpandableContent } from "../../../actions/ExpandableContent"
4
+ import { Heading } from "../../../text/Heading"
4
5
 
5
6
  export interface ExpandableSectionProps {
6
7
  content: string | React.ReactNode
@@ -28,7 +29,9 @@ const ExpandableSection = ({ content, expandableContent, strings }: ExpandableSe
28
29
  }
29
30
  return (
30
31
  <section className="aside-block">
31
- <h4 className="text-caps-underline">{strings.title}</h4>
32
+ <Heading priority={4} styleType={"underlineWeighted"}>
33
+ {strings.title}
34
+ </Heading>
32
35
  <div className="text-tiny text-gray-750">
33
36
  {getTextContent(content)}
34
37
  {expandableContent && (
@@ -4,7 +4,7 @@ import { Button } from "../../../actions/Button"
4
4
  import { LinkButton } from "../../../actions/LinkButton"
5
5
  import { AppearanceStyleType } from "../../../global/AppearanceTypes"
6
6
  import { Address } from "../../../helpers/MultiLineAddress"
7
- import { Heading } from "../../../headers/Heading"
7
+ import { Heading } from "../../../text/Heading"
8
8
  import { t } from "../../../helpers/translator"
9
9
  import { OrDivider } from "./OrDivider"
10
10
  import { ContactAddress } from "./ContactAddress"
@@ -56,9 +56,10 @@ const GetApplication = (props: ApplicationsProps) => {
56
56
 
57
57
  return (
58
58
  <section className="aside-block" data-test-id="get-application-section">
59
- <h2 className="text-caps-underline">
59
+ <Heading priority={2} styleType={"underlineWeighted"}>
60
60
  {props.strings?.howToApply ?? t("listings.apply.howToApply")}
61
- </h2>
61
+ </Heading>
62
+
62
63
  {!props.applicationsOpen && (
63
64
  <p className="mb-5 text-gray-700">
64
65
  {props.strings?.applicationsOpenInFuture ??
@@ -121,7 +122,7 @@ const GetApplication = (props: ApplicationsProps) => {
121
122
  {props.applicationsOpen && (props.onlineApplicationURL || props.paperMethod) && (
122
123
  <OrDivider bgColor="white" />
123
124
  )}
124
- <Heading priority={3} style={"sidebarSubHeader"}>
125
+ <Heading priority={3} styleType={"capsWeighted"}>
125
126
  {props.strings?.pickUpApplication ?? t("listings.apply.pickUpAnApplication")}
126
127
  </Heading>
127
128
  <ContactAddress
@@ -130,7 +131,7 @@ const GetApplication = (props: ApplicationsProps) => {
130
131
  />
131
132
  {props.applicationPickUpAddressOfficeHours && (
132
133
  <>
133
- <Heading priority={3} style={"sidebarSubHeader"}>
134
+ <Heading priority={3} styleType={"capsWeighted"}>
134
135
  {props.strings?.officeHoursHeading ?? t("leasingAgent.officeHours")}
135
136
  </Heading>
136
137
  <p className="text-gray-800 text-tiny markdown">
@@ -1,4 +1,5 @@
1
1
  import * as React from "react"
2
+ import { Heading } from "../../../text/Heading"
2
3
 
3
4
  export interface QuantityRow {
4
5
  amount: number | null
@@ -33,7 +34,9 @@ const QuantityRowSection = ({ quantityRows, strings }: QuantityRowSectionProps)
33
34
 
34
35
  return (
35
36
  <section className="aside-block is-tinted">
36
- <h4 className="text-caps-tiny">{strings.sectionTitle}</h4>
37
+ <Heading priority={4} styleType={"capsWeighted"}>
38
+ {strings.sectionTitle}
39
+ </Heading>
37
40
  <div>
38
41
  {strings.description && (
39
42
  <p className="text-tiny text-gray-800 pb-3">{strings.description}</p>
@@ -1,4 +1,5 @@
1
1
  import * as React from "react"
2
+ import { Heading } from "../../../text/Heading"
2
3
  import { t } from "../../../helpers/translator"
3
4
  import { Icon, IconFillColors } from "../../../icons/Icon"
4
5
 
@@ -16,7 +17,9 @@ const ReferralApplication = (props: ReferralApplicationProps) => {
16
17
 
17
18
  return (
18
19
  <section className="aside-block">
19
- <h2 className="text-caps-underline">{props.strings.title}</h2>
20
+ <Heading priority={2} styleType={"underlineWeighted"}>
21
+ {props.strings.title}
22
+ </Heading>
20
23
  <p>
21
24
  <a href={linkedPhoneNumber}>
22
25
  <Icon symbol="phone" size="medium" fill={IconFillColors.primary} />{" "}
@@ -1,5 +1,5 @@
1
1
  import * as React from "react"
2
- import { Heading, HeadingProps } from "../../../headers/Heading"
2
+ import { Heading, HeadingProps } from "../../../text/Heading"
3
3
 
4
4
  export interface SidebarBlockProps extends Omit<HeadingProps, "children" | "className"> {
5
5
  children: React.ReactNode
@@ -7,11 +7,11 @@ export interface SidebarBlockProps extends Omit<HeadingProps, "children" | "clas
7
7
  title?: string
8
8
  }
9
9
 
10
- const SidebarBlock = ({ children, className, title, priority, style }: SidebarBlockProps) => {
10
+ const SidebarBlock = ({ children, className, title, priority, styleType }: SidebarBlockProps) => {
11
11
  return (
12
12
  <section className={`aside-block ${className ? className : ""}`}>
13
13
  {title && (
14
- <Heading priority={priority ?? 4} style={style ?? "sidebarHeader"}>
14
+ <Heading priority={priority ?? 4} styleType={styleType ?? "underlineWeighted"}>
15
15
  {title}
16
16
  </Heading>
17
17
  )}
@@ -3,7 +3,7 @@ import Markdown from "markdown-to-jsx"
3
3
  import { Address } from "../../../helpers/MultiLineAddress"
4
4
  import { ContactAddress } from "./ContactAddress"
5
5
  import { OrDivider } from "./OrDivider"
6
- import { Heading } from "../../../headers/Heading"
6
+ import { Heading } from "../../../text/Heading"
7
7
 
8
8
  export interface ApplicationAddressesProps {
9
9
  /** The dropoff address for paper applications */
@@ -38,7 +38,7 @@ const SubmitApplication = ({
38
38
  <div className="text-serif-lg">{strings.sectionHeader}</div>
39
39
  {applicationMailingAddress && (
40
40
  <>
41
- <Heading priority={3} style={"sidebarSubHeader"}>
41
+ <Heading priority={3} styleType={"capsWeighted"}>
42
42
  {strings.mailHeader}
43
43
  </Heading>
44
44
  <>
@@ -51,13 +51,13 @@ const SubmitApplication = ({
51
51
  {applicationDropOffAddress && (
52
52
  <>
53
53
  {applicationMailingAddress && <OrDivider bgColor="gray-100" />}
54
- <Heading priority={3} style={"sidebarSubHeader"}>
54
+ <Heading priority={3} styleType={"capsWeighted"}>
55
55
  {strings.dropOffHeader}
56
56
  </Heading>
57
57
  <ContactAddress address={applicationDropOffAddress} mapString={strings.mapString} />
58
58
  {applicationDropOffAddressOfficeHours && (
59
59
  <>
60
- <Heading priority={3} style={"sidebarSubHeader"}>
60
+ <Heading priority={3} styleType={"capsWeighted"}>
61
61
  {strings.officeHoursHeader}
62
62
  </Heading>
63
63
  <p className="mt-4 text-tiny text-gray-750">
@@ -1,5 +1,5 @@
1
1
  import * as React from "react"
2
- import { Heading } from "../../../../headers/Heading"
2
+ import { Heading } from "../../../../text/Heading"
3
3
 
4
4
  export type EventType = {
5
5
  timeString?: string
@@ -28,7 +28,10 @@ const EventSection = (props: EventSectionProps) => {
28
28
  return (
29
29
  <section className="aside-block">
30
30
  {props.headerText && (
31
- <Heading priority={4} style={props.sectionHeader ? "sidebarHeader" : "sidebarSubHeader"}>
31
+ <Heading
32
+ priority={4}
33
+ styleType={props.sectionHeader ? "underlineWeighted" : "capsWeighted"}
34
+ >
32
35
  {props.headerText}
33
36
  </Heading>
34
37
  )}
@@ -1,5 +1,5 @@
1
1
  import * as React from "react"
2
- import { Heading } from "../headers/Heading"
2
+ import { Heading } from "../text/Heading"
3
3
  import "./InfoCardGrid.scss"
4
4
 
5
5
  export interface InfoCardGridProps {
@@ -11,7 +11,7 @@ export interface InfoCardGridProps {
11
11
  const InfoCardGrid = (props: InfoCardGridProps) => (
12
12
  <section className="info-cards">
13
13
  <header className="info-cards__header">
14
- <Heading style={"sidebarHeader"} priority={2} className={"text-tiny"}>
14
+ <Heading styleType={"underlineWeighted"} priority={2} className={"text-tiny"}>
15
15
  {props.title}
16
16
  </Heading>
17
17
  {props.subtitle && <p className="info-cards__subtitle">{props.subtitle}</p>}
@@ -1,6 +1,6 @@
1
1
  import * as React from "react"
2
2
  import { StackedTable, StackedTableProps } from "./StackedTable"
3
- import { Heading } from "../headers/Heading"
3
+ import { Heading } from "../text/Heading"
4
4
 
5
5
  export interface CategoryTableSection {
6
6
  /** The header text for a category */
@@ -18,7 +18,7 @@ const CategoryTable = (props: CategoryTableProps) => {
18
18
  const tables = props.categoryData.map((category, index) => {
19
19
  return (
20
20
  <div key={index}>
21
- <Heading priority={3} style={"categoryHeader"}>
21
+ <Heading priority={3} styleType={"lightWeighted"}>
22
22
  {category.header}
23
23
  </Heading>
24
24
  <hr className={"my-2"} />
@@ -0,0 +1,18 @@
1
+ import { Canvas, Story, ArgsTable } from "@storybook/addon-docs"
2
+ import { Swatch } from "../prototypes/Swatch"
3
+ import { Heading } from "./Heading"
4
+
5
+ # Heading
6
+
7
+ 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
+
9
+ <Canvas>
10
+ <Story id="text-heading--large-header" />
11
+ </Canvas>
12
+
13
+ <br />
14
+ <br />
15
+
16
+ ## Component Properties
17
+
18
+ <ArgsTable of={Heading} />
@@ -4,26 +4,26 @@ export interface HeadingProps {
4
4
  children?: React.ReactNode
5
5
  className?: string
6
6
  priority?: number
7
- style?: HeaderType
7
+ styleType?: HeaderType
8
8
  }
9
9
 
10
10
  export type HeaderType = keyof typeof HeaderStyleMap
11
11
 
12
12
  const HeaderStyleMap = {
13
- cardHeader: "card-header",
14
- cardSubheader: "card-subheader",
15
- tableHeader: "table-header",
16
- tableSubheader: "table-subheader",
17
- sidebarHeader: "text-caps-underline",
18
- categoryHeader: "category-header",
19
- sidebarSubHeader: "text-caps-tiny",
13
+ largePrimary: "text__large-primary",
14
+ mediumNormal: "text__medium-normal",
15
+ smallWeighted: "text__small-weighted",
16
+ smallNormal: "text__small-normal",
17
+ underlineWeighted: "text__underline-weighted",
18
+ lightWeighted: "text__light-weighted",
19
+ capsWeighted: "text__caps-weighted",
20
20
  }
21
21
 
22
22
  const Heading = (props: HeadingProps) => {
23
23
  const priority = props.priority && props.priority >= 1 && props.priority <= 6 ? props.priority : 1
24
24
  const Tag = `h${priority}` as keyof JSX.IntrinsicElements
25
25
  const classNames = []
26
- if (props.style) classNames.push(HeaderStyleMap[props.style])
26
+ if (props.styleType) classNames.push(HeaderStyleMap[props.styleType])
27
27
  if (props.className) classNames.push(props.className)
28
28
 
29
29
  return <Tag className={classNames.join(" ")}>{props.children}</Tag>
package/src/text/Tag.scss CHANGED
@@ -122,7 +122,7 @@
122
122
  }
123
123
 
124
124
  &.is-info {
125
- color: var(--info-appearance-label-color, var(--bloom-color-gray-800));
125
+ color: var(--info-appearance-label-color, var(--bloom-text-color-dark));
126
126
  background-color: var(--info-appearance-background-color, var(--bloom-color-warn-light));
127
127
  }
128
128
 
@@ -89,6 +89,7 @@ module.exports = {
89
89
  800: "var(--bloom-color-gray-800)",
90
90
  750: "var(--bloom-color-gray-750)",
91
91
  700: "var(--bloom-color-gray-700)",
92
+ 650: "var(--bloom-color-gray-650)",
92
93
  600: "var(--bloom-color-gray-600)",
93
94
  550: "var(--bloom-color-gray-550)",
94
95
  500: "var(--bloom-color-gray-500)",