@bloom-housing/ui-components 2.0.0-pre-tailwind
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/.jest/setup-tests.js +24 -0
- package/CHANGELOG.md +20 -0
- package/README.md +195 -0
- package/index.ts +148 -0
- package/jest.config.js +41 -0
- package/package.json +98 -0
- package/public/images/alameda-logo-white.svg +1 -0
- package/public/images/arrow-down.png +0 -0
- package/public/images/arrow-down.svg +1 -0
- package/public/images/check.png +0 -0
- package/public/images/check.svg +11 -0
- package/public/images/eho-logo-white.svg +1 -0
- package/public/images/eho-logo.svg +1 -0
- package/public/images/logo_glyph.svg +11 -0
- package/src/actions/Button.scss +157 -0
- package/src/actions/Button.tsx +80 -0
- package/src/actions/ExpandableContent.tsx +29 -0
- package/src/actions/ExpandableText.scss +18 -0
- package/src/actions/ExpandableText.tsx +52 -0
- package/src/actions/LinkButton.tsx +30 -0
- package/src/actions/LocalizedLink.tsx +11 -0
- package/src/authentication/AuthContext.ts +327 -0
- package/src/authentication/RequireLogin.tsx +62 -0
- package/src/authentication/index.ts +5 -0
- package/src/authentication/timeout.tsx +127 -0
- package/src/authentication/token.ts +17 -0
- package/src/authentication/useRequireLoggedInUser.ts +19 -0
- package/src/blocks/ActionBlock.scss +108 -0
- package/src/blocks/ActionBlock.tsx +51 -0
- package/src/blocks/AppStatusItem.scss +140 -0
- package/src/blocks/AppStatusItem.tsx +75 -0
- package/src/blocks/DashBlock.tsx +42 -0
- package/src/blocks/DashBlocks.scss +56 -0
- package/src/blocks/DashBlocks.tsx +7 -0
- package/src/blocks/FormCard.scss +201 -0
- package/src/blocks/FormCard.tsx +29 -0
- package/src/blocks/HousingCounselor.tsx +51 -0
- package/src/blocks/ImageCard.scss +91 -0
- package/src/blocks/ImageCard.tsx +77 -0
- package/src/blocks/InfoCard.scss +42 -0
- package/src/blocks/InfoCard.tsx +44 -0
- package/src/blocks/StatusBar.scss +30 -0
- package/src/blocks/StatusBar.tsx +31 -0
- package/src/blocks/ViewItem.scss +59 -0
- package/src/blocks/ViewItem.tsx +32 -0
- package/src/config/ConfigContext.tsx +36 -0
- package/src/config/NavigationContext.tsx +54 -0
- package/src/config/index.ts +2 -0
- package/src/footers/ExygyFooter.tsx +12 -0
- package/src/footers/SiteFooter.scss +28 -0
- package/src/footers/SiteFooter.tsx +10 -0
- package/src/forms/CloudinaryUpload.ts +50 -0
- package/src/forms/DOBField.tsx +132 -0
- package/src/forms/DateField.tsx +120 -0
- package/src/forms/Dropzone.scss +17 -0
- package/src/forms/Dropzone.tsx +67 -0
- package/src/forms/Field.tsx +115 -0
- package/src/forms/FieldGroup.tsx +82 -0
- package/src/forms/Form.tsx +22 -0
- package/src/forms/HouseholdMemberForm.tsx +41 -0
- package/src/forms/HouseholdSizeField.tsx +74 -0
- package/src/forms/PhoneField.tsx +69 -0
- package/src/forms/PhoneMask.tsx +24 -0
- package/src/forms/Select.tsx +80 -0
- package/src/forms/Textarea.scss +40 -0
- package/src/forms/Textarea.tsx +64 -0
- package/src/forms/TimeField.tsx +176 -0
- package/src/global/AppearanceTypes.ts +46 -0
- package/src/global/ApplicationStatusType.ts +6 -0
- package/src/global/accordion.scss +4 -0
- package/src/global/blocks.scss +137 -0
- package/src/global/custom_counter.scss +50 -0
- package/src/global/forms.scss +362 -0
- package/src/global/headers.scss +89 -0
- package/src/global/homepage.scss +8 -0
- package/src/global/index.scss +72 -0
- package/src/global/lists.scss +21 -0
- package/src/global/markdown.scss +33 -0
- package/src/global/mixins.scss +175 -0
- package/src/global/navbar.scss +280 -0
- package/src/global/print.scss +59 -0
- package/src/global/tables.scss +197 -0
- package/src/global/text.scss +141 -0
- package/src/global/vendor/AgPagination.tsx +133 -0
- package/src/global/vendor/_setup_bulma.scss +31 -0
- package/src/global/vendor/ag_grid.scss +140 -0
- package/src/headers/Hero.scss +56 -0
- package/src/headers/Hero.tsx +76 -0
- package/src/headers/PageHeader.scss +31 -0
- package/src/headers/PageHeader.tsx +39 -0
- package/src/headers/SiteHeader.tsx +136 -0
- package/src/helpers/address.tsx +46 -0
- package/src/helpers/blankApplication.ts +108 -0
- package/src/helpers/capitalize.tsx +7 -0
- package/src/helpers/dateToString.ts +11 -0
- package/src/helpers/debounce.ts +12 -0
- package/src/helpers/formOptions.tsx +229 -0
- package/src/helpers/formatYesNoLabel.ts +9 -0
- package/src/helpers/getTranslationWithArguments.ts +14 -0
- package/src/helpers/links.ts +7 -0
- package/src/helpers/localeRoute.tsx +13 -0
- package/src/helpers/mergeDeep.ts +12 -0
- package/src/helpers/nextjs.ts +7 -0
- package/src/helpers/numberOrdinal.ts +17 -0
- package/src/helpers/occupancyFormatting.tsx +46 -0
- package/src/helpers/pdfs.ts +19 -0
- package/src/helpers/photos.ts +19 -0
- package/src/helpers/preferences.tsx +426 -0
- package/src/helpers/resolveObject.ts +5 -0
- package/src/helpers/state.tsx +7 -0
- package/src/helpers/tableSummaries.tsx +80 -0
- package/src/helpers/translator.tsx +37 -0
- package/src/helpers/useKeyPress.ts +17 -0
- package/src/helpers/useMutate.ts +40 -0
- package/src/helpers/useOutsideClick.ts +25 -0
- package/src/helpers/validators.ts +3 -0
- package/src/icons/HeaderBadge.scss +29 -0
- package/src/icons/HeaderBadge.tsx +38 -0
- package/src/icons/Icon.scss +76 -0
- package/src/icons/Icon.tsx +145 -0
- package/src/icons/Icons.tsx +556 -0
- package/src/lists/PreferencesList.scss +72 -0
- package/src/lists/PreferencesList.tsx +60 -0
- package/src/locales/es.json +745 -0
- package/src/locales/general.json +1307 -0
- package/src/locales/general_OLD.json +868 -0
- package/src/locales/vi.json +745 -0
- package/src/locales/zh.json +745 -0
- package/src/navigation/Breadcrumbs.scss +25 -0
- package/src/navigation/Breadcrumbs.tsx +27 -0
- package/src/navigation/FooterNav.scss +47 -0
- package/src/navigation/FooterNav.tsx +19 -0
- package/src/navigation/LanguageNav.scss +32 -0
- package/src/navigation/LanguageNav.tsx +53 -0
- package/src/navigation/ProgressNav.scss +102 -0
- package/src/navigation/ProgressNav.tsx +50 -0
- package/src/navigation/TabNav.scss +38 -0
- package/src/navigation/TabNav.tsx +69 -0
- package/src/navigation/Tabs.scss +65 -0
- package/src/navigation/Tabs.tsx +93 -0
- package/src/navigation/UserNav.tsx +37 -0
- package/src/notifications/AlertBox.scss +78 -0
- package/src/notifications/AlertBox.tsx +79 -0
- package/src/notifications/AlertNotice.scss +58 -0
- package/src/notifications/AlertNotice.tsx +37 -0
- package/src/notifications/ApplicationStatus.scss +10 -0
- package/src/notifications/ApplicationStatus.tsx +64 -0
- package/src/notifications/ErrorMessage.tsx +15 -0
- package/src/notifications/SiteAlert.tsx +54 -0
- package/src/notifications/StatusAside.scss +11 -0
- package/src/notifications/StatusAside.tsx +25 -0
- package/src/notifications/StatusMessage.scss +25 -0
- package/src/notifications/StatusMessage.tsx +59 -0
- package/src/notifications/alertTypes.ts +7 -0
- package/src/notifications/index.ts +4 -0
- package/src/overlays/Drawer.scss +105 -0
- package/src/overlays/Drawer.tsx +51 -0
- package/src/overlays/LoadingOverlay.scss +25 -0
- package/src/overlays/LoadingOverlay.tsx +29 -0
- package/src/overlays/Modal.scss +55 -0
- package/src/overlays/Modal.tsx +61 -0
- package/src/overlays/Overlay.scss +50 -0
- package/src/overlays/Overlay.tsx +100 -0
- package/src/page_components/listing/AdditionalFees.tsx +56 -0
- package/src/page_components/listing/ListingCard.scss +47 -0
- package/src/page_components/listing/ListingCard.tsx +34 -0
- package/src/page_components/listing/ListingDetailHeader.tsx +25 -0
- package/src/page_components/listing/ListingDetails.tsx +29 -0
- package/src/page_components/listing/ListingMap.scss +36 -0
- package/src/page_components/listing/ListingMap.tsx +138 -0
- package/src/page_components/listing/ListingsGroup.scss +65 -0
- package/src/page_components/listing/ListingsGroup.tsx +49 -0
- package/src/page_components/listing/UnitTables.tsx +111 -0
- package/src/page_components/listing/listing_sidebar/ApplicationSection.tsx +49 -0
- package/src/page_components/listing/listing_sidebar/Apply.tsx +225 -0
- package/src/page_components/listing/listing_sidebar/LeasingAgent.tsx +77 -0
- package/src/page_components/listing/listing_sidebar/ListingUpdated.tsx +20 -0
- package/src/page_components/listing/listing_sidebar/ReferralApplication.tsx +28 -0
- package/src/page_components/listing/listing_sidebar/SidebarAddress.tsx +56 -0
- package/src/page_components/listing/listing_sidebar/Waitlist.tsx +94 -0
- package/src/page_components/listing/listing_sidebar/WhatToExpect.tsx +22 -0
- package/src/page_components/listing/listing_sidebar/events/DownloadLotteryResults.tsx +34 -0
- package/src/page_components/listing/listing_sidebar/events/EventDateSection.tsx +24 -0
- package/src/page_components/listing/listing_sidebar/events/LotteryResultsEvent.tsx +26 -0
- package/src/page_components/listing/listing_sidebar/events/OpenHouseEvent.tsx +27 -0
- package/src/page_components/listing/listing_sidebar/events/PublicLotteryEvent.tsx +22 -0
- package/src/prototypes/AppCard.scss +64 -0
- package/src/prototypes/Back.scss +19 -0
- package/src/prototypes/ButtonGroup.scss +6 -0
- package/src/prototypes/ButtonPager.scss +22 -0
- package/src/prototypes/FieldSection.scss +35 -0
- package/src/prototypes/FieldSection.tsx +31 -0
- package/src/prototypes/GridItem.tsx +15 -0
- package/src/prototypes/SideNav.scss +32 -0
- package/src/prototypes/SideNav.tsx +14 -0
- package/src/prototypes/SummaryCard.scss +34 -0
- package/src/sections/ContentSection.scss +15 -0
- package/src/sections/ContentSection.tsx +25 -0
- package/src/sections/FooterSection.scss +6 -0
- package/src/sections/FooterSection.tsx +16 -0
- package/src/sections/GridSection.scss +72 -0
- package/src/sections/GridSection.tsx +82 -0
- package/src/sections/InfoCardGrid.scss +45 -0
- package/src/sections/InfoCardGrid.tsx +20 -0
- package/src/sections/ListSection.scss +7 -0
- package/src/sections/ListSection.tsx +23 -0
- package/src/sections/MarkdownSection.scss +13 -0
- package/src/sections/MarkdownSection.tsx +21 -0
- package/src/sections/ResponsiveContentList.tsx +67 -0
- package/src/sections/ResponsiveWrappers.tsx +23 -0
- package/src/tables/GroupedTable.tsx +86 -0
- package/src/tables/MinimalTable.tsx +32 -0
- package/src/tables/ResponsiveTable.tsx +24 -0
- package/src/tables/StandardTable.tsx +229 -0
- package/src/text/Description.scss +52 -0
- package/src/text/Description.tsx +24 -0
- package/src/text/Message.scss +16 -0
- package/src/text/Message.tsx +16 -0
- package/src/text/Tag.scss +94 -0
- package/src/text/Tag.tsx +22 -0
- package/tailwind.config.js +128 -0
- package/tailwind.tosass.js +29 -0
- package/tsconfig.json +31 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@import "../global/mixins.scss";
|
|
2
|
+
|
|
3
|
+
// Description
|
|
4
|
+
.description__title {
|
|
5
|
+
@apply font-serif;
|
|
6
|
+
@apply text-xl;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.description__body {
|
|
10
|
+
@apply mb-4;
|
|
11
|
+
|
|
12
|
+
@screen md {
|
|
13
|
+
padding-top: 0.4em;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Data lists
|
|
18
|
+
.column-definition-list {
|
|
19
|
+
@include clearfix;
|
|
20
|
+
|
|
21
|
+
.description__title {
|
|
22
|
+
@apply text-lg;
|
|
23
|
+
@apply text-gray-800;
|
|
24
|
+
@apply mb-3;
|
|
25
|
+
clear: left;
|
|
26
|
+
|
|
27
|
+
@screen md {
|
|
28
|
+
@apply pl-4;
|
|
29
|
+
@apply border-l-2;
|
|
30
|
+
@apply border-gray-450;
|
|
31
|
+
@apply float-left;
|
|
32
|
+
@apply w-1/3;
|
|
33
|
+
@apply pr-3;
|
|
34
|
+
margin-top: 0.15rem;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.description__body {
|
|
39
|
+
@apply text-tiny;
|
|
40
|
+
@apply mb-5;
|
|
41
|
+
|
|
42
|
+
@screen md {
|
|
43
|
+
@apply mb-0;
|
|
44
|
+
@apply float-left;
|
|
45
|
+
@apply w-2/3;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:last-of-type {
|
|
49
|
+
@apply w-full;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import "./Description.scss"
|
|
3
|
+
import Markdown from "markdown-to-jsx"
|
|
4
|
+
|
|
5
|
+
export interface DescriptionProps {
|
|
6
|
+
term: string
|
|
7
|
+
description: any
|
|
8
|
+
markdown?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export const Description = (props: DescriptionProps) => {
|
|
12
|
+
return (
|
|
13
|
+
<>
|
|
14
|
+
<dd className="description__title">{props.term}</dd>
|
|
15
|
+
{props.markdown ? (
|
|
16
|
+
<dt className="description__body">
|
|
17
|
+
<Markdown options={{ disableParsingRawHTML: true }} children={props.description} />
|
|
18
|
+
</dt>
|
|
19
|
+
) : (
|
|
20
|
+
<dt className="description__body">{props.description}</dt>
|
|
21
|
+
)}
|
|
22
|
+
</>
|
|
23
|
+
)
|
|
24
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.message {
|
|
2
|
+
@apply py-2;
|
|
3
|
+
@apply px-4;
|
|
4
|
+
@apply bg-primary-lighter;
|
|
5
|
+
@apply font-semibold;
|
|
6
|
+
@apply uppercase;
|
|
7
|
+
@apply tracking-wider;
|
|
8
|
+
@apply text-sm;
|
|
9
|
+
@apply border-l-2;
|
|
10
|
+
@apply border-primary;
|
|
11
|
+
|
|
12
|
+
&.is-warning {
|
|
13
|
+
@apply bg-accent-warm-lighter;
|
|
14
|
+
@apply border-accent-warm;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import "./Message.scss"
|
|
3
|
+
|
|
4
|
+
export interface MessageProps {
|
|
5
|
+
children: React.ReactNode
|
|
6
|
+
warning?: boolean
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const Message = (props: MessageProps) => {
|
|
10
|
+
const messageClasses = ["message"]
|
|
11
|
+
if (props.warning) messageClasses.push("is-warning")
|
|
12
|
+
|
|
13
|
+
return <div className={messageClasses.join(" ")}>{props.children}</div>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { Message as default, Message }
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
.tag {
|
|
2
|
+
@apply py-3;
|
|
3
|
+
@apply px-5;
|
|
4
|
+
@apply text-white;
|
|
5
|
+
@apply text-tiny;
|
|
6
|
+
@apply bg-primary;
|
|
7
|
+
@apply rounded-md;
|
|
8
|
+
@apply text-center;
|
|
9
|
+
|
|
10
|
+
&.is-pill {
|
|
11
|
+
@apply px-4;
|
|
12
|
+
@apply py-2;
|
|
13
|
+
@apply bg-primary-light;
|
|
14
|
+
@apply text-primary-dark;
|
|
15
|
+
@apply rounded-full;
|
|
16
|
+
@apply font-semibold;
|
|
17
|
+
@apply font-alt-sans;
|
|
18
|
+
@apply uppercase;
|
|
19
|
+
@apply tracking-ultrawide;
|
|
20
|
+
@apply inline;
|
|
21
|
+
@apply text-tiny;
|
|
22
|
+
@apply leading-4;
|
|
23
|
+
|
|
24
|
+
&.is-small {
|
|
25
|
+
@apply text-2xs;
|
|
26
|
+
@apply py-1;
|
|
27
|
+
@apply px-3;
|
|
28
|
+
@apply leading-3;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&.fill-container {
|
|
33
|
+
@apply w-full;
|
|
34
|
+
@apply inline-block;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&.is-warning {
|
|
38
|
+
@apply bg-accent-warm-dark;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.is-secondary {
|
|
42
|
+
@apply text-white;
|
|
43
|
+
@apply bg-secondary;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&.is-success {
|
|
47
|
+
&:not(.is-light-mode) {
|
|
48
|
+
@apply text-white;
|
|
49
|
+
@apply bg-success;
|
|
50
|
+
}
|
|
51
|
+
&.is-light-mode {
|
|
52
|
+
@apply text-gray-900;
|
|
53
|
+
@apply bg-success-light;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
&.is-accent-cool {
|
|
58
|
+
&:not(.is-light-mode) {
|
|
59
|
+
@apply text-white;
|
|
60
|
+
@apply bg-accent-cool-dark;
|
|
61
|
+
}
|
|
62
|
+
&.is-light-mode {
|
|
63
|
+
@apply text-gray-900;
|
|
64
|
+
@apply bg-accent-cool;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&.is-accent-warm {
|
|
69
|
+
&:not(.is-light-mode) {
|
|
70
|
+
@apply text-white;
|
|
71
|
+
@apply bg-accent-warm-dark;
|
|
72
|
+
}
|
|
73
|
+
&.is-light-mode {
|
|
74
|
+
@apply text-gray-900;
|
|
75
|
+
@apply bg-accent-warm;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&.is-closed {
|
|
80
|
+
@apply text-white;
|
|
81
|
+
@apply bg-gray-750;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.is-info {
|
|
85
|
+
@apply text-gray-800;
|
|
86
|
+
@apply bg-warn-light;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
&.is-small {
|
|
90
|
+
@apply text-sm;
|
|
91
|
+
@apply py-2;
|
|
92
|
+
@apply px-4;
|
|
93
|
+
}
|
|
94
|
+
}
|
package/src/text/Tag.tsx
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as React from "react"
|
|
2
|
+
import { AppearanceProps, classNamesForAppearanceTypes } from "../global/AppearanceTypes"
|
|
3
|
+
import "./Tag.scss"
|
|
4
|
+
|
|
5
|
+
export interface TagProps extends AppearanceProps {
|
|
6
|
+
className?: string
|
|
7
|
+
pillStyle?: boolean
|
|
8
|
+
children: React.ReactNode
|
|
9
|
+
fillContainer?: boolean
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const Tag = (props: TagProps) => {
|
|
13
|
+
const tagClasses = ["tag"].concat(classNamesForAppearanceTypes(props))
|
|
14
|
+
|
|
15
|
+
if (props.pillStyle) tagClasses.push("is-pill")
|
|
16
|
+
if (props.fillContainer) tagClasses.push("fill-container")
|
|
17
|
+
if (props.className) tagClasses.push(props.className)
|
|
18
|
+
|
|
19
|
+
return <span className={tagClasses.join(" ")}>{props.children}</span>
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export { Tag as default, Tag }
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
important: true,
|
|
5
|
+
purge: false,
|
|
6
|
+
future: {
|
|
7
|
+
removeDeprecatedGapUtilities: true,
|
|
8
|
+
},
|
|
9
|
+
theme: {
|
|
10
|
+
screens: {
|
|
11
|
+
sm: "640px",
|
|
12
|
+
md: "768px",
|
|
13
|
+
lg: "1200px",
|
|
14
|
+
xl: "1280px",
|
|
15
|
+
print: { raw: "print" },
|
|
16
|
+
},
|
|
17
|
+
fontSize: {
|
|
18
|
+
"2xs": ".6875rem",
|
|
19
|
+
xs: ".75rem",
|
|
20
|
+
sm: ".8125rem",
|
|
21
|
+
tiny: ".875rem",
|
|
22
|
+
base: "1rem",
|
|
23
|
+
lg: "1.25rem",
|
|
24
|
+
xl: "1.375rem",
|
|
25
|
+
"2xl": "1.5rem",
|
|
26
|
+
"3xl": "1.625rem",
|
|
27
|
+
"4xl": "2rem",
|
|
28
|
+
"5xl": "2.5rem",
|
|
29
|
+
"6xl": "3rem",
|
|
30
|
+
"7xl": "4.5rem",
|
|
31
|
+
},
|
|
32
|
+
fontFamily: {
|
|
33
|
+
sans: ["Open Sans", "Helvetica", "Arial", "Verdana", "sans-serif"],
|
|
34
|
+
serif: ["Droid Serif", "Georgia", "Times", "serif"],
|
|
35
|
+
"alt-sans": ["Lato", "Helvetica", "Arial", "Verdana", "sans-serif"],
|
|
36
|
+
},
|
|
37
|
+
colors: {
|
|
38
|
+
primary: "#0077DA",
|
|
39
|
+
"primary-dark": "#0067be",
|
|
40
|
+
"primary-darker": "#205493",
|
|
41
|
+
"primary-light": "#DAEEFF",
|
|
42
|
+
"primary-lighter": "#F5F8F9",
|
|
43
|
+
secondary: "#0067be",
|
|
44
|
+
alert: "#E41D3D",
|
|
45
|
+
"alert-light": "#F9D2D8",
|
|
46
|
+
"alert-dark": "#B21D38",
|
|
47
|
+
success: "#2E8540",
|
|
48
|
+
"success-light": "#B4E5BE",
|
|
49
|
+
"success-dark": "#216E1F",
|
|
50
|
+
warn: "#FDB81E",
|
|
51
|
+
"warn-light": "#FEE8B6",
|
|
52
|
+
"warn-dark": "#E5A000",
|
|
53
|
+
"accent-cool": "#00BED5",
|
|
54
|
+
"accent-cool-light": "#C8F1FF",
|
|
55
|
+
"accent-cool-dark": "#009DB0",
|
|
56
|
+
"accent-warm": "#ff6627",
|
|
57
|
+
"accent-warm-dark": "#D54309",
|
|
58
|
+
"accent-warm-light": "#FFD2C0",
|
|
59
|
+
"accent-warm-lighter": "#FFF7F3",
|
|
60
|
+
royal: "#B85ED5",
|
|
61
|
+
"royal-light": "#EED7F5",
|
|
62
|
+
"royal-dark": "#A131C6",
|
|
63
|
+
lush: "#99CD00",
|
|
64
|
+
"lush-light": "#F2FFCD",
|
|
65
|
+
"lush-dark": "#7CA700",
|
|
66
|
+
white: "#FFFFFF",
|
|
67
|
+
black: "#000000",
|
|
68
|
+
blue: {
|
|
69
|
+
800: "#205493",
|
|
70
|
+
700: "#0067be",
|
|
71
|
+
600: "#0077DA",
|
|
72
|
+
300: "#DAEEFF",
|
|
73
|
+
200: "#F5F8F9",
|
|
74
|
+
},
|
|
75
|
+
red: {
|
|
76
|
+
700: "#E41D3D",
|
|
77
|
+
300: "#F9D2D8",
|
|
78
|
+
},
|
|
79
|
+
yellow: {
|
|
80
|
+
700: "#FDB81E",
|
|
81
|
+
300: "#FEE8B6",
|
|
82
|
+
},
|
|
83
|
+
green: {
|
|
84
|
+
700: "#2E8540",
|
|
85
|
+
300: "#B4E5BE",
|
|
86
|
+
},
|
|
87
|
+
teal: {
|
|
88
|
+
700: "#2E8540",
|
|
89
|
+
300: "#B4E5BE",
|
|
90
|
+
},
|
|
91
|
+
gray: {
|
|
92
|
+
950: "#242C2E",
|
|
93
|
+
900: "#222222",
|
|
94
|
+
850: "#333333",
|
|
95
|
+
800: "#30383A",
|
|
96
|
+
750: "#555555",
|
|
97
|
+
700: "#767676",
|
|
98
|
+
600: "#999999",
|
|
99
|
+
550: "#AAAAAA",
|
|
100
|
+
500: "#CCCCCC",
|
|
101
|
+
450: "#DEDEE0",
|
|
102
|
+
400: "#EFEFEF",
|
|
103
|
+
300: "#F6F6F6",
|
|
104
|
+
200: "#F7F7F7",
|
|
105
|
+
100: "#F9F9F9",
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
letterSpacing: {
|
|
109
|
+
tightest: "-.075em",
|
|
110
|
+
tighter: "-.05em",
|
|
111
|
+
tight: "-.025em",
|
|
112
|
+
normal: "0",
|
|
113
|
+
wide: ".025em",
|
|
114
|
+
wider: ".05em",
|
|
115
|
+
widest: ".12em",
|
|
116
|
+
ultrawide: ".25em",
|
|
117
|
+
},
|
|
118
|
+
extend: {
|
|
119
|
+
borderColor: (theme) => ({
|
|
120
|
+
default: theme("colors.gray.450", "currentColor"),
|
|
121
|
+
}),
|
|
122
|
+
inset: {
|
|
123
|
+
4: "1rem",
|
|
124
|
+
"-10": "-2.5rem",
|
|
125
|
+
},
|
|
126
|
+
},
|
|
127
|
+
},
|
|
128
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/* eslint-env node */
|
|
2
|
+
|
|
3
|
+
const tailwindToSassVars = (bloomTheme) => {
|
|
4
|
+
const bloomColorVars = Object.keys(bloomTheme.theme.colors).map((colorKey) => {
|
|
5
|
+
if (typeof bloomTheme.theme.colors[colorKey] == "object") {
|
|
6
|
+
// create a map variable that can be used by the map-get SCSS function
|
|
7
|
+
let colorMap = "$tailwind-" + colorKey + ": ("
|
|
8
|
+
colorMap += Object.keys(bloomTheme.theme.colors[colorKey])
|
|
9
|
+
.map((colorMapKey) => {
|
|
10
|
+
return `${colorMapKey}: ${bloomTheme.theme.colors[colorKey][colorMapKey]}`
|
|
11
|
+
})
|
|
12
|
+
.join(", ")
|
|
13
|
+
return colorMap + ");"
|
|
14
|
+
} else {
|
|
15
|
+
// return a simple variable
|
|
16
|
+
return `$tailwind-${colorKey}: ${bloomTheme.theme.colors[colorKey]};`
|
|
17
|
+
}
|
|
18
|
+
})
|
|
19
|
+
const bloomScreenVars = Object.keys(bloomTheme.theme.screens).map((screenKey) => {
|
|
20
|
+
return `$tailwind-screens-${screenKey}: ${bloomTheme.theme.screens[screenKey]};`
|
|
21
|
+
})
|
|
22
|
+
|
|
23
|
+
// Uncomment this if you want to debug:
|
|
24
|
+
// console.log(bloomColorVars.concat(bloomScreenVars).join("\n"))
|
|
25
|
+
|
|
26
|
+
return bloomColorVars.concat(bloomScreenVars).join("\n")
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
module.exports = tailwindToSassVars
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "../tsconfig.json" /* TODO: is this worth connecting? */,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "build/lib",
|
|
5
|
+
// "module": "es2015",
|
|
6
|
+
"module": "esnext",
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"target": "es5",
|
|
9
|
+
"lib": ["es5", "es6", "es7", "es2017", "dom"],
|
|
10
|
+
"sourceMap": true,
|
|
11
|
+
"allowJs": true,
|
|
12
|
+
"jsx": "react",
|
|
13
|
+
"moduleResolution": "node",
|
|
14
|
+
"rootDirs": ["src"],
|
|
15
|
+
"baseUrl": "src",
|
|
16
|
+
"forceConsistentCasingInFileNames": true,
|
|
17
|
+
"noImplicitReturns": true,
|
|
18
|
+
"noImplicitThis": true,
|
|
19
|
+
"noImplicitAny": true,
|
|
20
|
+
"strictNullChecks": true,
|
|
21
|
+
"suppressImplicitAnyIndexErrors": true,
|
|
22
|
+
"noUnusedLocals": false,
|
|
23
|
+
"declaration": true,
|
|
24
|
+
"allowSyntheticDefaultImports": true,
|
|
25
|
+
"experimentalDecorators": true,
|
|
26
|
+
"emitDecoratorMetadata": true,
|
|
27
|
+
"resolveJsonModule": true
|
|
28
|
+
},
|
|
29
|
+
"include": ["src/**/*", "__tests__/**/*"]
|
|
30
|
+
// "exclude": ["../../node_modules", "node_modules", "build", "scripts"]
|
|
31
|
+
}
|