@bloom-housing/ui-components 4.2.3 → 4.3.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 (62) hide show
  1. package/CHANGELOG.md +535 -2
  2. package/README.md +10 -4
  3. package/index.ts +14 -10
  4. package/package.json +6 -4
  5. package/src/actions/Button.docs.mdx +76 -0
  6. package/src/actions/Button.scss +58 -61
  7. package/src/authentication/timeout.tsx +1 -0
  8. package/src/blocks/DashBlock.tsx +5 -3
  9. package/src/blocks/DashBlocks.scss +4 -1
  10. package/src/blocks/FormCard.tsx +1 -1
  11. package/src/forms/FieldGroup.tsx +18 -17
  12. package/src/global/app-css.scss +7 -0
  13. package/src/global/markdown.scss +20 -0
  14. package/src/global/mixins.scss +66 -49
  15. package/src/global/tables.scss +236 -58
  16. package/src/global/text.scss +11 -3
  17. package/src/global/tokens/borders.scss +15 -0
  18. package/src/global/tokens/colors.scss +64 -0
  19. package/src/global/tokens/fonts.scss +45 -0
  20. package/src/global/tokens/screens.scss +6 -0
  21. package/src/global/tokens/sizes.scss +48 -0
  22. package/src/headers/Heading.tsx +2 -0
  23. package/src/headers/PageHeader.docs.mdx +45 -0
  24. package/src/headers/PageHeader.scss +30 -17
  25. package/src/headers/PageHeader.tsx +2 -10
  26. package/src/headers/SiteHeader.tsx +7 -1
  27. package/src/helpers/MultiLineAddress.tsx +37 -0
  28. package/src/helpers/OneLineAddress.tsx +21 -0
  29. package/src/helpers/tableSummaries.tsx +34 -23
  30. package/src/locales/general.json +12 -2
  31. package/src/navigation/FooterNav.scss +8 -3
  32. package/src/overlays/Drawer.tsx +11 -3
  33. package/src/overlays/Modal.tsx +16 -7
  34. package/src/overlays/Overlay.tsx +4 -3
  35. package/src/page_components/ApplicationTimeline.scss +36 -0
  36. package/src/page_components/ApplicationTimeline.tsx +33 -0
  37. package/src/page_components/forgot-password/FormForgotPassword.tsx +5 -4
  38. package/src/page_components/listing/AdditionalFees.tsx +38 -31
  39. package/src/page_components/listing/ListingCard.scss +12 -0
  40. package/src/page_components/listing/ListingCard.tsx +5 -3
  41. package/src/page_components/listing/ListingMap.tsx +7 -2
  42. package/src/page_components/listing/UnitTables.tsx +19 -18
  43. package/src/page_components/listing/listing_sidebar/Contact.tsx +110 -0
  44. package/src/page_components/listing/listing_sidebar/ContactAddress.tsx +41 -0
  45. package/src/page_components/listing/listing_sidebar/GetApplication.tsx +35 -15
  46. package/src/page_components/listing/listing_sidebar/QuantityRowSection.tsx +46 -0
  47. package/src/page_components/listing/listing_sidebar/SubmitApplication.tsx +52 -57
  48. package/src/page_components/listing/listing_sidebar/events/EventSection.tsx +3 -2
  49. package/src/page_components/sign-in/FormSignIn.tsx +2 -1
  50. package/src/page_components/sign-in/ResendConfirmationModal.tsx +106 -0
  51. package/src/prototypes/Swatch.tsx +10 -0
  52. package/src/tables/CategoryTable.tsx +33 -0
  53. package/src/tables/GroupedTable.tsx +5 -5
  54. package/src/tables/MinimalTable.tsx +12 -2
  55. package/src/tables/StackedTable.tsx +38 -26
  56. package/src/tables/StandardTable.tsx +26 -10
  57. package/tailwind.config.js +76 -81
  58. package/tailwind.tosass.js +2 -1
  59. package/src/helpers/address.tsx +0 -46
  60. package/src/page_components/listing/listing_sidebar/LeasingAgent.tsx +0 -72
  61. package/src/page_components/listing/listing_sidebar/SidebarAddress.tsx +0 -56
  62. package/src/page_components/listing/listing_sidebar/Waitlist.tsx +0 -49
@@ -1,4 +1,5 @@
1
1
  import * as React from "react"
2
+ import Heading from "../../../../headers/Heading"
2
3
 
3
4
  export type EventType = {
4
5
  timeString?: string
@@ -19,9 +20,9 @@ const EventSection = (props: EventSectionProps) => {
19
20
  return (
20
21
  <section className="aside-block">
21
22
  {props.headerText && (
22
- <h4 className={props.sectionHeader ? "text-caps-underline" : "text-caps-tiny"}>
23
+ <Heading priority={4} style={props.sectionHeader ? "sidebarHeader" : "sidebarSubHeader"}>
23
24
  {props.headerText}
24
- </h4>
25
+ </Heading>
25
26
  )}
26
27
  {props.events.map((event, index) => (
27
28
  <div key={`events-${index}`} className={`${index !== props.events.length - 1 && "pb-3"}`}>
@@ -43,6 +43,7 @@ export type FormSignInControl = {
43
43
  errors: UseFormMethods["errors"]
44
44
  handleSubmit: UseFormMethods["handleSubmit"]
45
45
  register: UseFormMethods["register"]
46
+ watch: UseFormMethods["watch"]
46
47
  }
47
48
 
48
49
  export type FormSignInValues = {
@@ -111,7 +112,7 @@ const FormSignIn = ({
111
112
  </Form>
112
113
  </div>
113
114
  {showRegisterBtn && (
114
- <div className="form-card__group text-center">
115
+ <div className="form-card__group text-center border-t">
115
116
  <h2 className="mb-6">{t("authentication.createAccount.noAccount")}</h2>
116
117
 
117
118
  <LinkButton href="/create-account">{t("account.createAccount")}</LinkButton>
@@ -0,0 +1,106 @@
1
+ import {
2
+ AppearanceStyleType,
3
+ Button,
4
+ Modal,
5
+ t,
6
+ Form,
7
+ Field,
8
+ emailRegex,
9
+ } from "@bloom-housing/ui-components"
10
+ import React, { useEffect, useMemo } from "react"
11
+ import { useForm } from "react-hook-form"
12
+
13
+ export type ResendConfirmationModalProps = {
14
+ isOpen: boolean
15
+ initialEmailValue: string
16
+ onClose: () => void
17
+ onSubmit: (email: string) => void
18
+ loading: boolean
19
+ }
20
+
21
+ export type ResendConfirmationModalForm = {
22
+ onSubmit: (email: string) => void
23
+ }
24
+
25
+ const ResendConfirmationModal = ({
26
+ isOpen,
27
+ initialEmailValue,
28
+ loading,
29
+ onClose,
30
+ onSubmit,
31
+ }: ResendConfirmationModalProps) => {
32
+ // eslint-disable-next-line @typescript-eslint/unbound-method
33
+ const { register, errors, reset, getValues, trigger } = useForm({
34
+ defaultValues: useMemo(() => {
35
+ return {
36
+ emailResend: initialEmailValue,
37
+ }
38
+ }, [initialEmailValue]),
39
+ })
40
+
41
+ useEffect(() => {
42
+ reset({
43
+ emailResend: initialEmailValue,
44
+ })
45
+ }, [initialEmailValue, reset])
46
+
47
+ const onFormSubmit = async () => {
48
+ const isValid = await trigger()
49
+ if (!isValid) return
50
+
51
+ const { emailResend } = getValues()
52
+ onSubmit(emailResend)
53
+ }
54
+
55
+ return (
56
+ <Modal
57
+ open={isOpen}
58
+ title={t("authentication.signIn.yourAccountIsNotConfirmed")}
59
+ ariaDescription={t("authentication.createAccount.linkExpired")}
60
+ onClose={() => {
61
+ onClose()
62
+ window.scrollTo(0, 0)
63
+ }}
64
+ actions={[
65
+ <Button
66
+ type="button"
67
+ styleType={AppearanceStyleType.primary}
68
+ onClick={() => onFormSubmit()}
69
+ loading={loading}
70
+ >
71
+ {t("authentication.createAccount.resendTheEmail")}
72
+ </Button>,
73
+ <Button
74
+ type="button"
75
+ styleType={AppearanceStyleType.alert}
76
+ onClick={() => {
77
+ onClose()
78
+ window.scrollTo(0, 0)
79
+ }}
80
+ >
81
+ {t("t.cancel")}
82
+ </Button>,
83
+ ]}
84
+ >
85
+ <>
86
+ <Form>
87
+ <Field
88
+ caps={true}
89
+ type="email"
90
+ name="emailResend"
91
+ label={t("authentication.createAccount.resendAnEmailTo")}
92
+ placeholder="example@web.com"
93
+ validation={{ required: true, pattern: emailRegex }}
94
+ error={!!errors.emailResend}
95
+ errorMessage={t("authentication.signIn.loginError")}
96
+ register={register}
97
+ />
98
+ </Form>
99
+
100
+ <p className="pt-4">{t("authentication.createAccount.resendEmailInfo")}</p>
101
+ </>
102
+ </Modal>
103
+ )
104
+ }
105
+
106
+ export { ResendConfirmationModal as default, ResendConfirmationModal }
@@ -0,0 +1,10 @@
1
+ import * as React from "react"
2
+
3
+ export const Swatch = (props: { colorVar: string }) => (
4
+ <span
5
+ style={{ backgroundColor: `var(${props.colorVar})` }}
6
+ className="w-6 border border-gray-500 inline-block"
7
+ >
8
+ &nbsp;
9
+ </span>
10
+ )
@@ -0,0 +1,33 @@
1
+ import * as React from "react"
2
+ import { StackedTable, StackedTableProps } from "./StackedTable"
3
+ import { Heading } from "../headers/Heading"
4
+
5
+ export interface CategoryTableSection {
6
+ /** The header text for a category */
7
+ header: string
8
+ /** The table data for a category */
9
+ tableData: StackedTableProps
10
+ }
11
+
12
+ export interface CategoryTableProps {
13
+ /** The table data passed as category section strings associated with a table data set */
14
+ categoryData: CategoryTableSection[]
15
+ }
16
+
17
+ const CategoryTable = (props: CategoryTableProps) => {
18
+ const tables = props.categoryData.map((category, index) => {
19
+ return (
20
+ <div key={index}>
21
+ <Heading priority={3} style={"categoryHeader"}>
22
+ {category.header}
23
+ </Heading>
24
+ <hr className={"my-2"} />
25
+ <StackedTable {...category.tableData} className={"category-table mb-2 md:mb-6"} />
26
+ </div>
27
+ )
28
+ })
29
+
30
+ return <>{tables}</>
31
+ }
32
+
33
+ export { CategoryTable as default, CategoryTable }
@@ -1,11 +1,11 @@
1
1
  import * as React from "react"
2
2
  import { nanoid } from "nanoid"
3
- import { Cell, StandardTableProps } from "./StandardTable"
3
+ import { Cell, StandardTableData, StandardTableProps } from "./StandardTable"
4
4
 
5
5
  export interface GroupedTableGroup {
6
6
  header?: string | React.ReactNode
7
7
  className?: string
8
- data: Record<string, React.ReactNode>[]
8
+ data: StandardTableData
9
9
  }
10
10
 
11
11
  export interface GroupedTableProps extends Omit<StandardTableProps, "data"> {
@@ -43,16 +43,16 @@ export const GroupedTable = (props: GroupedTableProps) => {
43
43
  )
44
44
  }
45
45
 
46
- groupData.forEach((row: Record<string, React.ReactNode>, groupDataIndex) => {
46
+ groupData.forEach((row, groupDataIndex) => {
47
47
  const rowKey = row["id"]
48
- ? `row-${row["id"] as string}`
48
+ ? `row-${row["id"].content as string}`
49
49
  : process.env.NODE_ENV === "test"
50
50
  ? `groupedrow-${dataIndex}-${groupDataIndex}`
51
51
  : nanoid()
52
52
  const cols = Object.keys(headers).map((colKey, colIndex) => {
53
53
  const uniqKey = process.env.NODE_ENV === "test" ? `col-${colIndex}` : nanoid()
54
54
  const header = headers[colKey]
55
- const cell = row[colKey]
55
+ const cell = row[colKey]?.content
56
56
  return (
57
57
  <Cell key={uniqKey} headerLabel={header} className={cellClassName}>
58
58
  {cell}
@@ -1,16 +1,26 @@
1
1
  import * as React from "react"
2
- import { TableHeaders, StandardTable } from "./StandardTable"
2
+ import { TableHeaders, StandardTable, StandardTableData } from "./StandardTable"
3
3
 
4
4
  export interface MinimalTableProps {
5
+ /** If the table should be sortable through dragging */
5
6
  draggable?: boolean
7
+ /** A set state function tied to the table's data, used if the table is draggable */
6
8
  setData?: (data: unknown[]) => void
9
+ /** The headers for the table passed as text content with optional settings */
7
10
  headers: TableHeaders
8
- data?: Record<string, React.ReactNode>[]
11
+ /** The table data passed as records of column name to cell data with optional settings */
12
+ data?: StandardTableData
13
+ /** Removes cell margins on the left of every row's first cell */
9
14
  flushLeft?: boolean
15
+ /** Removes cell margins on the right of every row's last cell */
10
16
  flushRight?: boolean
17
+ /** If the table should collapse on mobile views to show repeating columns on the left for every row */
11
18
  responsiveCollapse?: boolean
19
+ /** A class name applied to the root of the table */
12
20
  className?: string
21
+ /** A class name applied to the cells of the table */
13
22
  cellClassName?: string
23
+ /** An id applied to the table */
14
24
  id?: string
15
25
  }
16
26
 
@@ -1,43 +1,54 @@
1
1
  import * as React from "react"
2
- import { TableHeaders } from "./StandardTable"
2
+ import { StandardTableData, TableHeaders } from "./StandardTable"
3
3
  import { MinimalTable } from "./MinimalTable"
4
4
 
5
5
  export interface StackedTableRow {
6
+ /** The main text content of the cell */
6
7
  cellText: string
8
+ /** The subtext of the cell, displayed beneath the main text */
7
9
  cellSubText?: string
8
- hideMobile?: boolean
10
+ /** Hides this cell's subtext on mobile views */
11
+ hideSubTextMobile?: boolean
12
+ /** Text content that will replace this cell's header on mobile views */
13
+ mobileReplacement?: string
9
14
  }
10
15
 
11
16
  export interface StackedTableProps {
17
+ /** The headers for the table passed as text content with optional settings */
12
18
  headers: TableHeaders
19
+ /** Headers hidden on desktop views */
13
20
  headersHiddenDesktop?: string[]
21
+ /** The table data passed as records of column name to cell data */
14
22
  stackedData?: Record<string, StackedTableRow>[]
23
+ /** A class name applied to the root of the table */
15
24
  className?: string
16
25
  }
17
26
 
18
27
  const StackedTable = (props: StackedTableProps) => {
19
- const tableClasses = ["base", props.className]
20
- const modifiedData: Record<string, React.ReactNode>[] = []
21
- const cellTextClass = "font-semibold text-gray-750"
22
- const cellSubtextClass = "text-sm text-gray-700"
28
+ const tableClasses = ["base", "stacked-table", props.className]
29
+ const modifiedData: StandardTableData = []
30
+
23
31
  props.stackedData?.forEach((dataRow) => {
24
32
  const dataCell = Object.keys(dataRow).reduce((acc, item) => {
25
- acc[item] = (
26
- <div
27
- className={`md:flex md:flex-col w-1/2 md:w-full ${
28
- props.headersHiddenDesktop?.includes(item) && "md:hidden"
29
- }`}
30
- >
31
- <span className={`${cellTextClass}`}>{dataRow[item].cellText}</span>
32
- <span
33
- className={`pl-1 md:pl-0 ${
34
- dataRow[item].hideMobile && "hidden md:block"
35
- } ${cellSubtextClass}`}
33
+ acc[item] = {
34
+ content: (
35
+ <div
36
+ className={`stacked-table-cell-container ${
37
+ props.headersHiddenDesktop?.includes(item) && "md:hidden"
38
+ }`}
36
39
  >
37
- {dataRow[item].cellSubText}
38
- </span>
39
- </div>
40
- )
40
+ <span className={"stacked-table-cell"}>{dataRow[item].cellText}</span>
41
+ <span
42
+ className={`stacked-table-subtext ${
43
+ dataRow[item].hideSubTextMobile && "hidden md:block"
44
+ } `}
45
+ >
46
+ {dataRow[item].cellSubText}
47
+ </span>
48
+ </div>
49
+ ),
50
+ mobileReplacement: dataRow[item].cellText,
51
+ }
41
52
  return acc
42
53
  }, {})
43
54
  modifiedData.push(dataCell)
@@ -48,14 +59,15 @@ const StackedTable = (props: StackedTableProps) => {
48
59
  if (props.headersHiddenDesktop?.includes(headerKey)) {
49
60
  let headerClasses = "md:hidden"
50
61
  headerClasses = `${tempHeader["className"] && tempHeader["className"]} ${headerClasses}`
51
- tempHeader = { name: tempHeader["name"] ?? tempHeader, className: headerClasses }
62
+ tempHeader = {
63
+ name: tempHeader["name"] ?? tempHeader,
64
+ className: `stacked-table-header ${headerClasses}`,
65
+ }
52
66
  } else {
53
67
  acc[headerKey] = props.headers[headerKey]
54
68
  tempHeader = {
55
69
  name: tempHeader["name"] ?? tempHeader,
56
- className: `${
57
- tempHeader["className"] && tempHeader["className"]
58
- } px-0 text-base text-gray-700 border-b`,
70
+ className: `${tempHeader["className"] && tempHeader["className"]} stacked-table-header`,
59
71
  }
60
72
  }
61
73
  acc[headerKey] = tempHeader
@@ -68,7 +80,7 @@ const StackedTable = (props: StackedTableProps) => {
68
80
  data={modifiedData}
69
81
  className={tableClasses.join(" ")}
70
82
  responsiveCollapse={true}
71
- cellClassName={"py-3 px-0"}
83
+ cellClassName={"b-0"}
72
84
  />
73
85
  )
74
86
  }
@@ -7,6 +7,7 @@ import { t } from "../helpers/translator"
7
7
 
8
8
  export interface TableHeadersOptions {
9
9
  name: string
10
+ mobileReplacement?: string
10
11
  className?: string
11
12
  }
12
13
  export interface TableHeaders {
@@ -28,9 +29,11 @@ export const Cell = (props: {
28
29
  className?: string
29
30
  colSpan?: number
30
31
  children: React.ReactNode
32
+ mobileReplacement?: string | React.ReactNode
31
33
  }) => (
32
34
  <td
33
35
  data-label={props.headerLabel instanceof Object ? props.headerLabel?.name : props.headerLabel}
36
+ data-cell={props.mobileReplacement}
34
37
  className={props.className || "p-5"}
35
38
  colSpan={props.colSpan}
36
39
  >
@@ -42,20 +45,36 @@ export const TableThumbnail = (props: { children: React.ReactNode }) => {
42
45
  return <span className="table__thumbnail">{props.children}</span>
43
46
  }
44
47
 
48
+ export type StandardTableCell = {
49
+ /** The main content of the cell */
50
+ content: React.ReactNode
51
+ /** Text content that will replace this cell's header on mobile views */
52
+ mobileReplacement?: string
53
+ }
54
+
55
+ export type StandardTableData = Record<string, StandardTableCell>[]
56
+
45
57
  export interface StandardTableProps {
58
+ /** If the table should be sortable through dragging */
46
59
  draggable?: boolean
60
+ /** A set state function tied to the table's data, used if the table is draggable */
47
61
  setData?: (data: unknown[]) => void
62
+ /** The headers for the table passed as text content with optional settings */
48
63
  headers: TableHeaders
64
+ /** The table data passed as records of column name to cell data with optional settings */
49
65
  data?: StandardTableData
66
+ /** A class name applied to the root of the table */
50
67
  tableClassName?: string
68
+ /** A class name applied to each cell */
51
69
  cellClassName?: string
70
+ /** If the table should collapse on mobile views to show repeating columns on the left for every row */
52
71
  responsiveCollapse?: boolean
72
+ /** If cell text should be translated or left raw */
53
73
  translateData?: boolean
74
+ /** An id applied to the table */
54
75
  id?: string
55
76
  }
56
77
 
57
- export type StandardTableData = Record<string, React.ReactNode>[] | undefined
58
-
59
78
  const headerName = (header: string | TableHeadersOptions) => {
60
79
  if (typeof header === "string") {
61
80
  return header
@@ -99,16 +118,16 @@ export const StandardTable = (props: StandardTableProps) => {
99
118
  )
100
119
  }
101
120
 
102
- const body = tableData?.map((row: Record<string, React.ReactNode>, dataIndex) => {
121
+ const body = tableData?.map((row, dataIndex) => {
103
122
  const rowKey = row["id"]
104
- ? `row-${row["id"] as string}`
123
+ ? `row-${row["id"].content as string}`
105
124
  : process.env.NODE_ENV === "test"
106
125
  ? `standardrow-${dataIndex}`
107
126
  : nanoid()
108
127
 
109
128
  const cols = Object.keys(headers)?.map((colKey, colIndex) => {
110
129
  const uniqKey = process.env.NODE_ENV === "test" ? `standardcol-${colIndex}` : nanoid()
111
- const cell = row[colKey]
130
+ const cell = row[colKey]?.content
112
131
 
113
132
  const cellClass = [headerClassName(headers[colKey]), cellClassName].join(" ")
114
133
 
@@ -121,6 +140,7 @@ export const StandardTable = (props: StandardTableProps) => {
121
140
  : headers[colKey]
122
141
  }
123
142
  className={cellClass !== " " ? cellClass : undefined}
143
+ mobileReplacement={row[colKey]?.mobileReplacement}
124
144
  >
125
145
  {props.translateData && typeof cell === "string" && cell !== ""
126
146
  ? getTranslationWithArguments(cell)
@@ -176,11 +196,7 @@ export const StandardTable = (props: StandardTableProps) => {
176
196
  tableClasses.push(props.tableClassName)
177
197
  }
178
198
 
179
- const reorder = (
180
- list: Record<string, React.ReactNode>[] | undefined,
181
- startIndex: number,
182
- endIndex: number
183
- ) => {
199
+ const reorder = (list: StandardTableData | undefined, startIndex: number, endIndex: number) => {
184
200
  if (!list) return
185
201
 
186
202
  const result = Array.from(list)
@@ -12,106 +12,101 @@ module.exports = {
12
12
  print: { raw: "print" },
13
13
  },
14
14
  fontSize: {
15
- "2xs": ".6875rem",
16
- xs: ".75rem",
17
- sm: ".8125rem",
18
- tiny: ".875rem",
19
- base: "1rem",
20
- lg: "1.25rem",
21
- xl: "1.375rem",
22
- "2xl": "1.5rem",
23
- "3xl": "1.625rem",
24
- "4xl": "2rem",
25
- "5xl": "2.5rem",
26
- "6xl": "3rem",
27
- "6.5xl": "4rem",
28
- "7xl": "4.5rem",
15
+ "2xs": "var(--bloom-font-size-2xs)",
16
+ xs: "var(--bloom-font-size-xs)",
17
+ sm: "var(--bloom-font-size-sm)",
18
+ tiny: "var(--bloom-font-size-tiny)",
19
+ base: "var(--bloom-font-size-base)",
20
+ lg: "var(--bloom-font-size-lg)",
21
+ xl: "var(--bloom-font-size-xl)",
22
+ "2xl": "var(--bloom-font-size-2xl)",
23
+ "3xl": "var(--bloom-font-size-3xl)",
24
+ "4xl": "var(--bloom-font-size-4xl)",
25
+ "5xl": "var(--bloom-font-size-5xl)",
26
+ "6xl": "var(--bloom-font-size-6xl)",
27
+ "6.5xl": "var(--bloom-font-size-6_5xl)",
28
+ "7xl": "var(--bloom-font-size-7xl)",
29
29
  },
30
30
  fontFamily: {
31
- sans: ["Open Sans", "Helvetica", "Arial", "Verdana", "sans-serif"],
32
- serif: ["Droid Serif", "Georgia", "Times", "serif"],
33
- "alt-sans": ["Lato", "Helvetica", "Arial", "Verdana", "sans-serif"],
31
+ sans: "var(--bloom-font-sans)",
32
+ serif: "var(--bloom-font-serif)",
33
+ "alt-sans": "var(--bloom-font-alt-sans)",
34
34
  },
35
35
  colors: {
36
- primary: "#0077DA",
37
- "primary-dark": "#0067be",
38
- "primary-darker": "#205493",
39
- "primary-light": "#DAEEFF",
40
- "primary-lighter": "#F5F8F9",
41
- secondary: "#0067be",
42
- alert: "#E41D3D",
43
- "alert-light": "#F9D2D8",
44
- "alert-dark": "#B21D38",
45
- success: "#2E8540",
46
- "success-light": "#B4E5BE",
47
- "success-dark": "#216E1F",
48
- warn: "#FDB81E",
49
- "warn-light": "#FEE8B6",
50
- "warn-dark": "#E5A000",
51
- "accent-cool": "#00BED5",
52
- "accent-cool-light": "#C8F1FF",
53
- "accent-cool-dark": "#009DB0",
54
- "accent-warm": "#ff6627",
55
- "accent-warm-dark": "#D54309",
56
- "accent-warm-light": "#FFD2C0",
57
- "accent-warm-lighter": "#FFF7F3",
58
- royal: "#B85ED5",
59
- "royal-light": "#EED7F5",
60
- "royal-dark": "#A131C6",
61
- lush: "#99CD00",
62
- "lush-light": "#F2FFCD",
63
- "lush-dark": "#7CA700",
64
- white: "#FFFFFF",
65
- black: "#000000",
36
+ primary: "var(--bloom-color-primary)",
37
+ "primary-dark": "var(--bloom-color-primary-dark)",
38
+ "primary-darker": "var(--bloom-color-primary-darker)",
39
+ "primary-light": "var(--bloom-color-primary-light)",
40
+ "primary-lighter": "var(--bloom-color-primary-lighter)",
41
+ secondary: "var(--bloom-color-secondary)",
42
+ alert: "var(--bloom-color-alert)",
43
+ "alert-light": "var(--bloom-color-alert-light)",
44
+ "alert-dark": "var(--bloom-color-alert-dark)",
45
+ success: "var(--bloom-color-success)",
46
+ "success-light": "var(--bloom-color-success-light)",
47
+ "success-dark": "var(--bloom-color-success-dark)",
48
+ warn: "var(--bloom-color-warn)",
49
+ "warn-light": "var(--bloom-color-warn-light)",
50
+ "warn-dark": "var(--bloom-color-warn-dark)",
51
+ "accent-cool": "var(--bloom-color-accent-cool)",
52
+ "accent-cool-light": "var(--bloom-color-accent-cool-light)",
53
+ "accent-cool-dark": "var(--bloom-color-accent-cool-dark)",
54
+ "accent-warm": "var(--bloom-color-accent-warm)",
55
+ "accent-warm-dark": "var(--bloom-color-accent-warm-dark)",
56
+ "accent-warm-light": "var(--bloom-color-accent-warm-light)",
57
+ "accent-warm-lighter": "var(--bloom-color-accent-warm-lighter)",
58
+ lush: "var(--bloom-color-lush)",
59
+ white: "var(--bloom-color-white)",
60
+ black: "var(--bloom-color-black)",
66
61
  blue: {
67
- 800: "#205493",
68
- 700: "#0067be",
69
- 600: "#0077DA",
70
- 300: "#DAEEFF",
71
- 200: "#F5F8F9",
62
+ 800: "var(--bloom-color-blue-800)",
63
+ 700: "var(--bloom-color-blue-700)",
64
+ 600: "var(--bloom-color-blue-600)",
65
+ 300: "var(--bloom-color-blue-300)",
66
+ 200: "var(--bloom-color-blue-200)",
72
67
  },
73
68
  red: {
74
- 700: "#E41D3D",
75
- 300: "#F9D2D8",
69
+ 700: "var(--bloom-color-red-700)",
70
+ 300: "var(--bloom-color-red-300)",
76
71
  },
77
72
  yellow: {
78
- 700: "#FDB81E",
79
- 300: "#FEE8B6",
73
+ 700: "var(--bloom-color-yellow-700)",
74
+ 300: "var(--bloom-color-yellow-300)",
80
75
  },
81
76
  green: {
82
- 700: "#2E8540",
83
- 300: "#B4E5BE",
77
+ 700: "var(--bloom-color-green-700)",
78
+ 300: "var(--bloom-color-green-300)",
84
79
  },
85
80
  teal: {
86
- 700: "#2E8540",
87
- 300: "#B4E5BE",
81
+ 700: "var(--bloom-color-green-700)",
82
+ 300: "var(--bloom-color-green-300)",
88
83
  },
89
84
  gray: {
90
- 950: "#242C2E",
91
- 900: "#222222",
92
- 850: "#333333",
93
- 800: "#30383A",
94
- 750: "#555555",
95
- 700: "#767676",
96
- 600: "#999999",
97
- 550: "#AAAAAA",
98
- 500: "#CCCCCC",
99
- 450: "#DEDEE0",
100
- 400: "#EFEFEF",
101
- 300: "#F6F6F6",
102
- 200: "#F7F7F7",
103
- 100: "#F9F9F9",
85
+ 950: "var(--bloom-color-gray-950)",
86
+ 900: "var(--bloom-color-gray-900)",
87
+ 850: "var(--bloom-color-gray-850)",
88
+ 800: "var(--bloom-color-gray-800)",
89
+ 750: "var(--bloom-color-gray-750)",
90
+ 700: "var(--bloom-color-gray-700)",
91
+ 600: "var(--bloom-color-gray-600)",
92
+ 550: "var(--bloom-color-gray-550)",
93
+ 500: "var(--bloom-color-gray-500)",
94
+ 450: "var(--bloom-color-gray-450)",
95
+ 400: "var(--bloom-color-gray-400)",
96
+ 300: "var(--bloom-color-gray-300)",
97
+ 200: "var(--bloom-color-gray-200)",
98
+ 100: "var(--bloom-color-gray-100)",
104
99
  },
105
100
  },
106
101
  letterSpacing: {
107
- tightest: "-.075em",
108
- tighter: "-.05em",
109
- tight: "-.025em",
102
+ tightest: "var(--bloom-letter-spacing-tightest)",
103
+ tighter: "var(--bloom-letter-spacing-tighter)",
104
+ tight: "var(--bloom-letter-spacing-tight)",
110
105
  normal: "0",
111
- wide: ".025em",
112
- wider: ".05em",
113
- widest: ".12em",
114
- ultrawide: ".25em",
106
+ wide: "var(--bloom-letter-spacing-wide)",
107
+ wider: "var(--bloom-letter-spacing-wider)",
108
+ widest: "var(--bloom-letter-spacing-widest)",
109
+ ultrawide: "var(--bloom-letter-spacing-ultrawide)",
115
110
  },
116
111
  extend: {
117
112
  borderColor: (theme) => ({
@@ -1,6 +1,7 @@
1
1
  /* eslint-env node */
2
2
 
3
3
  const tailwindToSassVars = (bloomTheme) => {
4
+ // TODO: we should remove this in favor of just using the new CSS variables
4
5
  const bloomColorVars = Object.keys(bloomTheme.theme.colors).map((colorKey) => {
5
6
  if (typeof bloomTheme.theme.colors[colorKey] == "object") {
6
7
  // create a map variable that can be used by the map-get SCSS function
@@ -17,7 +18,7 @@ const tailwindToSassVars = (bloomTheme) => {
17
18
  }
18
19
  })
19
20
  const bloomScreenVars = Object.keys(bloomTheme.theme.screens).map((screenKey) => {
20
- return `$tailwind-screens-${screenKey}: ${bloomTheme.theme.screens[screenKey]};`
21
+ return `$screen-${screenKey}: ${bloomTheme.theme.screens[screenKey]};`
21
22
  })
22
23
 
23
24
  // Uncomment this if you want to debug: