@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.
- package/CHANGELOG.md +535 -2
- package/README.md +10 -4
- package/index.ts +14 -10
- package/package.json +6 -4
- package/src/actions/Button.docs.mdx +76 -0
- package/src/actions/Button.scss +58 -61
- package/src/authentication/timeout.tsx +1 -0
- package/src/blocks/DashBlock.tsx +5 -3
- package/src/blocks/DashBlocks.scss +4 -1
- package/src/blocks/FormCard.tsx +1 -1
- package/src/forms/FieldGroup.tsx +18 -17
- package/src/global/app-css.scss +7 -0
- package/src/global/markdown.scss +20 -0
- package/src/global/mixins.scss +66 -49
- package/src/global/tables.scss +236 -58
- package/src/global/text.scss +11 -3
- package/src/global/tokens/borders.scss +15 -0
- package/src/global/tokens/colors.scss +64 -0
- package/src/global/tokens/fonts.scss +45 -0
- package/src/global/tokens/screens.scss +6 -0
- package/src/global/tokens/sizes.scss +48 -0
- package/src/headers/Heading.tsx +2 -0
- package/src/headers/PageHeader.docs.mdx +45 -0
- package/src/headers/PageHeader.scss +30 -17
- package/src/headers/PageHeader.tsx +2 -10
- package/src/headers/SiteHeader.tsx +7 -1
- package/src/helpers/MultiLineAddress.tsx +37 -0
- package/src/helpers/OneLineAddress.tsx +21 -0
- package/src/helpers/tableSummaries.tsx +34 -23
- package/src/locales/general.json +12 -2
- package/src/navigation/FooterNav.scss +8 -3
- package/src/overlays/Drawer.tsx +11 -3
- package/src/overlays/Modal.tsx +16 -7
- package/src/overlays/Overlay.tsx +4 -3
- package/src/page_components/ApplicationTimeline.scss +36 -0
- package/src/page_components/ApplicationTimeline.tsx +33 -0
- package/src/page_components/forgot-password/FormForgotPassword.tsx +5 -4
- package/src/page_components/listing/AdditionalFees.tsx +38 -31
- package/src/page_components/listing/ListingCard.scss +12 -0
- package/src/page_components/listing/ListingCard.tsx +5 -3
- package/src/page_components/listing/ListingMap.tsx +7 -2
- package/src/page_components/listing/UnitTables.tsx +19 -18
- package/src/page_components/listing/listing_sidebar/Contact.tsx +110 -0
- package/src/page_components/listing/listing_sidebar/ContactAddress.tsx +41 -0
- package/src/page_components/listing/listing_sidebar/GetApplication.tsx +35 -15
- package/src/page_components/listing/listing_sidebar/QuantityRowSection.tsx +46 -0
- package/src/page_components/listing/listing_sidebar/SubmitApplication.tsx +52 -57
- package/src/page_components/listing/listing_sidebar/events/EventSection.tsx +3 -2
- package/src/page_components/sign-in/FormSignIn.tsx +2 -1
- package/src/page_components/sign-in/ResendConfirmationModal.tsx +106 -0
- package/src/prototypes/Swatch.tsx +10 -0
- package/src/tables/CategoryTable.tsx +33 -0
- package/src/tables/GroupedTable.tsx +5 -5
- package/src/tables/MinimalTable.tsx +12 -2
- package/src/tables/StackedTable.tsx +38 -26
- package/src/tables/StandardTable.tsx +26 -10
- package/tailwind.config.js +76 -81
- package/tailwind.tosass.js +2 -1
- package/src/helpers/address.tsx +0 -46
- package/src/page_components/listing/listing_sidebar/LeasingAgent.tsx +0 -72
- package/src/page_components/listing/listing_sidebar/SidebarAddress.tsx +0 -56
- package/src/page_components/listing/listing_sidebar/Waitlist.tsx +0 -49
package/index.ts
CHANGED
|
@@ -52,23 +52,24 @@ export * from "./src/headers/SiteHeader"
|
|
|
52
52
|
export * from "./src/headers/Heading"
|
|
53
53
|
|
|
54
54
|
/* Helpers */
|
|
55
|
-
export * from "./src/helpers/address"
|
|
56
55
|
export * from "./src/helpers/capitalize"
|
|
57
56
|
export * from "./src/helpers/dateToString"
|
|
57
|
+
export * from "./src/helpers/debounce"
|
|
58
58
|
export * from "./src/helpers/formOptions"
|
|
59
|
+
export * from "./src/helpers/formatYesNoLabel"
|
|
60
|
+
export * from "./src/helpers/getTranslationWithArguments"
|
|
59
61
|
export * from "./src/helpers/links"
|
|
60
62
|
export * from "./src/helpers/mergeDeep"
|
|
63
|
+
export * from "./src/helpers/MultiLineAddress"
|
|
61
64
|
export * from "./src/helpers/numberOrdinal"
|
|
62
|
-
export * from "./src/helpers/
|
|
63
|
-
export * from "./src/helpers/debounce"
|
|
64
|
-
export * from "./src/helpers/validators"
|
|
65
|
-
export * from "./src/helpers/formatYesNoLabel"
|
|
66
|
-
export * from "./src/helpers/getTranslationWithArguments"
|
|
65
|
+
export * from "./src/helpers/OneLineAddress"
|
|
67
66
|
export * from "./src/helpers/preferences"
|
|
68
67
|
export * from "./src/helpers/resolveObject"
|
|
68
|
+
export * from "./src/helpers/tableSummaries"
|
|
69
|
+
export * from "./src/helpers/translator"
|
|
69
70
|
export * from "./src/helpers/useIntersect"
|
|
70
71
|
export * from "./src/helpers/useMutate"
|
|
71
|
-
export * from "./src/helpers/
|
|
72
|
+
export * from "./src/helpers/validators"
|
|
72
73
|
|
|
73
74
|
/* Icons */
|
|
74
75
|
export * from "./src/icons/HeaderBadge"
|
|
@@ -98,6 +99,7 @@ export * from "./src/overlays/Drawer"
|
|
|
98
99
|
export * from "./src/overlays/LoadingOverlay"
|
|
99
100
|
|
|
100
101
|
/* Page Components */
|
|
102
|
+
export * from "./src/page_components/ApplicationTimeline"
|
|
101
103
|
export * from "./src/page_components/listing/AdditionalFees"
|
|
102
104
|
export * from "./src/page_components/listing/ContentAccordion"
|
|
103
105
|
export * from "./src/page_components/listing/ListingCard"
|
|
@@ -107,18 +109,19 @@ export * from "./src/page_components/listing/ListingMap"
|
|
|
107
109
|
export * from "./src/page_components/listing/ListingsGroup"
|
|
108
110
|
export * from "./src/page_components/listing/UnitTables"
|
|
109
111
|
export * from "./src/page_components/listing/listing_sidebar/GetApplication"
|
|
110
|
-
export * from "./src/page_components/listing/listing_sidebar/
|
|
112
|
+
export * from "./src/page_components/listing/listing_sidebar/Contact"
|
|
111
113
|
export * from "./src/page_components/listing/listing_sidebar/ListingUpdated"
|
|
112
114
|
export * from "./src/page_components/listing/listing_sidebar/NumberedHeader"
|
|
113
115
|
export * from "./src/page_components/listing/listing_sidebar/OrDivider"
|
|
114
116
|
export * from "./src/page_components/listing/listing_sidebar/ReferralApplication"
|
|
115
|
-
export * from "./src/page_components/listing/listing_sidebar/
|
|
117
|
+
export * from "./src/page_components/listing/listing_sidebar/ContactAddress"
|
|
116
118
|
export * from "./src/page_components/listing/listing_sidebar/SubmitApplication"
|
|
117
|
-
export * from "./src/page_components/listing/listing_sidebar/
|
|
119
|
+
export * from "./src/page_components/listing/listing_sidebar/QuantityRowSection"
|
|
118
120
|
export * from "./src/page_components/listing/listing_sidebar/WhatToExpect"
|
|
119
121
|
export * from "./src/page_components/listing/listing_sidebar/events/DownloadLotteryResults"
|
|
120
122
|
export * from "./src/page_components/listing/listing_sidebar/events/EventSection"
|
|
121
123
|
export * from "./src/page_components/sign-in/FormTerms"
|
|
124
|
+
export * from "./src/page_components/sign-in/ResendConfirmationModal"
|
|
122
125
|
export * from "./src/page_components/sign-in/FormSignIn"
|
|
123
126
|
export * from "./src/page_components/sign-in/FormSignInMFAType"
|
|
124
127
|
export * from "./src/page_components/sign-in/FormSignInMFACode"
|
|
@@ -143,6 +146,7 @@ export * from "./src/tables/StandardTable"
|
|
|
143
146
|
export * from "./src/tables/GroupedTable"
|
|
144
147
|
export * from "./src/tables/MinimalTable"
|
|
145
148
|
export * from "./src/tables/StackedTable"
|
|
149
|
+
export * from "./src/tables/CategoryTable"
|
|
146
150
|
|
|
147
151
|
/* Text */
|
|
148
152
|
export * from "./src/text/Description"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloom-housing/ui-components",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"author": "Sean Albert <sean.albert@exygy.com>",
|
|
5
5
|
"description": "Shared user interface components for Bloom affordable housing system",
|
|
6
6
|
"homepage": "https://github.com/bloom-housing/bloom/tree/master/shared/ui-components",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"@babel/preset-env": "^7.15.4",
|
|
25
25
|
"@emotion/core": "^10.0.35",
|
|
26
26
|
"@emotion/styled": "^10.0.27",
|
|
27
|
+
"@geometricpanda/storybook-addon-badges": "^0.2.1",
|
|
27
28
|
"@storybook/addon-a11y": "^6.3.8",
|
|
28
29
|
"@storybook/addon-actions": "^6.3.8",
|
|
29
30
|
"@storybook/addon-docs": "^6.3.8",
|
|
@@ -65,15 +66,16 @@
|
|
|
65
66
|
"style-loader": "^1.1.3",
|
|
66
67
|
"ts-jest": "^26.4.1",
|
|
67
68
|
"ts-loader": "^8.0.4",
|
|
68
|
-
"typescript": "^
|
|
69
|
+
"typescript": "^4.5.5",
|
|
69
70
|
"webpack": "^4.44.2"
|
|
70
71
|
},
|
|
71
72
|
"dependencies": {
|
|
72
|
-
"@bloom-housing/backend-core": "^4.
|
|
73
|
+
"@bloom-housing/backend-core": "^4.3.0",
|
|
73
74
|
"@mapbox/mapbox-sdk": "^0.13.0",
|
|
74
75
|
"@types/body-scroll-lock": "^2.6.1",
|
|
75
76
|
"@types/jwt-decode": "^2.2.1",
|
|
76
77
|
"@types/markdown-to-jsx": "^6.11.2",
|
|
78
|
+
"@types/mdx": "^2.0.1",
|
|
77
79
|
"@types/node": "^12.12.67",
|
|
78
80
|
"@types/node-polyglot": "^2.4.1",
|
|
79
81
|
"@types/react-beautiful-dnd": "^13.1.1",
|
|
@@ -100,5 +102,5 @@
|
|
|
100
102
|
"tailwindcss": "2.2.10",
|
|
101
103
|
"typesafe-actions": "^5.1.0"
|
|
102
104
|
},
|
|
103
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "1a7e221449e2af62cfa67b594779bcf7b900b5fc"
|
|
104
106
|
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { Canvas, Story, Source, ArgsTable } from "@storybook/addon-docs"
|
|
2
|
+
import { Swatch } from "../prototypes/Swatch"
|
|
3
|
+
import { Button } from "./Button"
|
|
4
|
+
|
|
5
|
+
# Button
|
|
6
|
+
|
|
7
|
+
The button component offers flexible usage with a variety of different appearance options. Size, color, and shape can be controlled via standardized props.
|
|
8
|
+
|
|
9
|
+
<Canvas>
|
|
10
|
+
<Button>This is a Button</Button>
|
|
11
|
+
</Canvas>
|
|
12
|
+
|
|
13
|
+
## Variants
|
|
14
|
+
|
|
15
|
+
There are several props which accept enums to adjust style type, border, and size. For example, to choose the "primary" style and a "small" size, you would pass the `AppearanceStyleType.primary` enum to `styleType` prop and `AppearanceSizeType.small` enum to `size` prop.
|
|
16
|
+
|
|
17
|
+
<Canvas>
|
|
18
|
+
<Story id="actions-button--small-and-primary" />
|
|
19
|
+
</Canvas>
|
|
20
|
+
|
|
21
|
+
Other variants include appearances which aren't button-like such as `unstyled` and `inline`.
|
|
22
|
+
|
|
23
|
+
## Component Properties
|
|
24
|
+
|
|
25
|
+
<ArgsTable of={Button} />
|
|
26
|
+
|
|
27
|
+
## Theming Variables
|
|
28
|
+
|
|
29
|
+
You can apply CSS variables to the `.button` selector to customize the appearance of the component.
|
|
30
|
+
|
|
31
|
+
### Color Variables
|
|
32
|
+
|
|
33
|
+
| Name | Color | Description |
|
|
34
|
+
| --------------------------------------------- | ------------------------------------------------ | ------------------------------------ |
|
|
35
|
+
| `--primary-appearance-background-color` | <Swatch colorVar="--bloom-color-primary" /> | Primary background color |
|
|
36
|
+
| `--primary-appearance-border-color` | <Swatch colorVar="--bloom-color-primary" /> | Primary border color |
|
|
37
|
+
| `--primary-appearance-label-color` | <Swatch colorVar="--bloom-color-white" /> | Primary label color |
|
|
38
|
+
| `--primary-appearance-hover-background-color` | <Swatch colorVar="--bloom-color-primary-dark" /> | Hover state primary background color |
|
|
39
|
+
| `--primary-appearance-hover-border-color` | <Swatch colorVar="--bloom-color-primary-dark" /> | Hover state primary border color |
|
|
40
|
+
| `--primary-appearance-hover-label-color` | <Swatch colorVar="--bloom-color-white" /> | Hover state primary label color |
|
|
41
|
+
| `--success-appearance-background-color` | <Swatch colorVar="--bloom-color-success" /> | Success background color |
|
|
42
|
+
| `--success-appearance-border-color` | <Swatch colorVar="--bloom-color-success" /> | Success border color |
|
|
43
|
+
| `--success-appearance-label-color` | <Swatch colorVar="--bloom-color-white" /> | Success label color |
|
|
44
|
+
| `--success-appearance-hover-background-color` | <Swatch colorVar="--bloom-color-success-dark" /> | Hover state success background color |
|
|
45
|
+
| `--success-appearance-hover-border-color` | <Swatch colorVar="--bloom-color-success" /> | Hover state success border color |
|
|
46
|
+
| `--success-appearance-hover-label-color` | <Swatch colorVar="--bloom-color-white" /> | Hover state success label color |
|
|
47
|
+
| `--alert-appearance-background-color` | <Swatch colorVar="--bloom-color-alert" /> | Alert background color |
|
|
48
|
+
| `--alert-appearance-border-color` | <Swatch colorVar="--bloom-color-alert" /> | Alert border color |
|
|
49
|
+
| `--alert-appearance-label-color` | <Swatch colorVar="--bloom-color-white" /> | Alert label color |
|
|
50
|
+
| `--alert-appearance-hover-background-color` | <Swatch colorVar="--bloom-color-alert-dark" /> | Hover state alert background color |
|
|
51
|
+
| `--alert-appearance-hover-border-color` | <Swatch colorVar="--bloom-color-alert" /> | Hover state alert border color |
|
|
52
|
+
| `--alert-appearance-hover-label-color` | <Swatch colorVar="--bloom-color-white" /> | Hover state alert label color |
|
|
53
|
+
| `--warn-appearance-background-color` | <Swatch colorVar="--bloom-color-warn" /> | Warning background color |
|
|
54
|
+
| `--warn-appearance-border-color` | <Swatch colorVar="--bloom-color-warn" /> | Warning border color |
|
|
55
|
+
| `--warn-appearance-label-color` | <Swatch colorVar="--bloom-color-white" /> | Warning label color |
|
|
56
|
+
| `--warn-appearance-hover-background-color` | <Swatch colorVar="--bloom-color-warn-dark" /> | Hover state warning background color |
|
|
57
|
+
| `--warn-appearance-hover-border-color` | <Swatch colorVar="--bloom-color-warn" /> | Hover state warning border color |
|
|
58
|
+
| `--warn-appearance-hover-label-color` | <Swatch colorVar="--bloom-color-white" /> | Hover state warning label color |
|
|
59
|
+
|
|
60
|
+
### Typographic & Spacing Variables
|
|
61
|
+
|
|
62
|
+
| Name | Type | Description | Default |
|
|
63
|
+
| ------------------------ | ----------- | --------------------------------------------------- | --------------------------------------------------- |
|
|
64
|
+
| `--label-font` | Font | Font family of the button label | `--bloom-font-alt-sans` |
|
|
65
|
+
| `--label-transform` | Case | Text case of the button label | `uppercase` |
|
|
66
|
+
| `--label-letter-spacing` | Size | The average gap between letters of the button label | `--bloom-letter-spacing-widest` |
|
|
67
|
+
| `--label-weight` | Font Weight | Typographic weight of the button label | `bold` |
|
|
68
|
+
| `--normal-rounded` | Size | Border radius of a normal-size button | `--bloom-rounded` |
|
|
69
|
+
| `--normal-padding` | Size | Padding of the normal-size button interior | `--bloom-s4` (top/bottom) `--bloom-s6` (left/right) |
|
|
70
|
+
| `--normal-font-size` | Size | Font size of the normal-size button | `--bloom-font-size-sm` |
|
|
71
|
+
| `--small-rounded` | Size | Border radius of a small-size button | `--bloom-rounded` |
|
|
72
|
+
| `--small-padding` | Size | Padding of the small-size button interior | `--bloom-s3` (top/bottom) `--bloom-s6` (left/right) |
|
|
73
|
+
| `--small-font-size` | Size | Font size of the small-size button | `--bloom-font-size-xs` |
|
|
74
|
+
| `--big-rounded` | Size | Border radius of a large-size button | `--bloom-rounded` |
|
|
75
|
+
| `--big-padding` | Size | Padding of the large-size button interior | `--bloom-s6` |
|
|
76
|
+
| `--big-font-size` | Size | Font size of the large-size button | `--bloom-font-size-sm` |
|
package/src/actions/Button.scss
CHANGED
|
@@ -1,59 +1,58 @@
|
|
|
1
1
|
@import "../global/mixins.scss";
|
|
2
2
|
|
|
3
3
|
.button {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
@apply font-bold;
|
|
16
|
-
@apply leading-snug;
|
|
4
|
+
position: relative;
|
|
5
|
+
border-radius: var(--normal-rounded, var(--bloom-rounded));
|
|
6
|
+
padding: var(--normal-padding, var(--bloom-s4) var(--bloom-s6));
|
|
7
|
+
text-align: center;
|
|
8
|
+
text-transform: var(--label-transform, uppercase);
|
|
9
|
+
font-family: var(--label-font, var(--bloom-font-alt-sans));
|
|
10
|
+
display: inline-block;
|
|
11
|
+
letter-spacing: var(--label-letter-spacing, var(--bloom-letter-spacing-widest));
|
|
12
|
+
font-size: var(--normal-font-size, var(--bloom-font-size-sm));
|
|
13
|
+
font-weight: var(--label-weight, bold);
|
|
14
|
+
line-height: var(--bloom-line-height-snug);
|
|
17
15
|
|
|
18
16
|
&:focus {
|
|
19
17
|
outline: none;
|
|
20
|
-
box-shadow: 0 0 0 2px #fff, 0 0 3px 4px
|
|
18
|
+
box-shadow: 0 0 0 2px #fff, 0 0 3px 4px var(--bloom-color-accent-cool);
|
|
21
19
|
}
|
|
22
20
|
|
|
23
21
|
&:hover {
|
|
24
|
-
|
|
22
|
+
border-color: var(--bloom-color-primary-dark);
|
|
25
23
|
}
|
|
26
24
|
|
|
27
25
|
&:disabled {
|
|
28
26
|
pointer-events: none;
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
27
|
+
background-color: var(--bloom-color-white);
|
|
28
|
+
border-color: var(--bloom-color-gray-450);
|
|
29
|
+
color: var(--bloom-color-gray-450);
|
|
32
30
|
}
|
|
33
31
|
|
|
34
32
|
&.is-secondary {
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
border-color: var(--bloom-color-gray-700);
|
|
34
|
+
color: var(--bloom-color-gray-700);
|
|
37
35
|
|
|
38
36
|
&:hover {
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
background-color: var(--bloom-color-gray-700);
|
|
38
|
+
color: var(--bloom-color-white);
|
|
41
39
|
}
|
|
42
40
|
}
|
|
43
41
|
|
|
44
42
|
&.is-small {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
border-radius: var(--small-rounded, var(--bloom-rounded));
|
|
44
|
+
padding: var(--small-padding, var(--bloom-s3) var(--bloom-s6));
|
|
45
|
+
font-size: var(--small-font-size, var(--bloom-font-size-xs));
|
|
48
46
|
}
|
|
49
47
|
|
|
50
48
|
&.is-big {
|
|
51
|
-
|
|
52
|
-
|
|
49
|
+
border-radius: var(--big-rounded, var(--bloom-rounded));
|
|
50
|
+
padding: var(--big-padding, var(--bloom-s6));
|
|
51
|
+
font-size: var(--big-font-size, var(--bloom-font-size-sm));
|
|
53
52
|
}
|
|
54
53
|
|
|
55
54
|
&.is-normal-case {
|
|
56
|
-
|
|
55
|
+
text-transform: none;
|
|
57
56
|
}
|
|
58
57
|
|
|
59
58
|
&.is-unstyled {
|
|
@@ -62,74 +61,72 @@
|
|
|
62
61
|
|
|
63
62
|
&.is-unstyled,
|
|
64
63
|
&.is-inline {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
64
|
+
text-transform: none;
|
|
65
|
+
border: none;
|
|
66
|
+
padding: 0;
|
|
67
|
+
font-family: var(--bloom-font-sans);
|
|
68
|
+
letter-spacing: normal;
|
|
69
|
+
font-weight: 400;
|
|
70
|
+
text-decoration: underline;
|
|
71
|
+
margin: var(--bloom-s4);
|
|
72
|
+
font-size: var(--bloom-font-size-tiny);
|
|
74
73
|
|
|
75
74
|
&:hover {
|
|
76
|
-
|
|
75
|
+
color: var(--bloom-color-primary);
|
|
77
76
|
background: transparent;
|
|
78
77
|
}
|
|
79
78
|
}
|
|
80
79
|
|
|
81
80
|
&.is-inline {
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
81
|
+
color: var(--bloom-color-primary);
|
|
82
|
+
font-weight: 600;
|
|
83
|
+
font-size: var(--bloom-font-size-tiny);
|
|
84
|
+
margin: 0;
|
|
85
|
+
text-decoration: none;
|
|
87
86
|
|
|
88
87
|
&.has-icon-left {
|
|
89
88
|
.button__icon {
|
|
90
|
-
|
|
89
|
+
margin-right: var(--bloom-s1);
|
|
91
90
|
}
|
|
92
91
|
}
|
|
93
92
|
&.has-icon-right {
|
|
94
93
|
.button__icon {
|
|
95
|
-
|
|
94
|
+
margin-left: var(--bloom-s1);
|
|
96
95
|
}
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
98
|
|
|
100
99
|
&.has-icon-left {
|
|
101
100
|
.button__icon {
|
|
102
|
-
|
|
101
|
+
margin-right: var(--bloom-s3);
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
&.has-icon-right {
|
|
106
105
|
.button__icon {
|
|
107
|
-
|
|
106
|
+
margin-left: var(--bloom-s3);
|
|
108
107
|
}
|
|
109
108
|
}
|
|
110
109
|
|
|
111
110
|
&.is-text-caps {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
@apply text-tiny;
|
|
123
|
-
@apply block;
|
|
111
|
+
color: var(--bloom-color-primary-dark);
|
|
112
|
+
border: none;
|
|
113
|
+
padding: 0;
|
|
114
|
+
font-family: var(--bloom-font-sans);
|
|
115
|
+
letter-spacing: normal;
|
|
116
|
+
text-decoration: underline;
|
|
117
|
+
margin: var(--bloom-s4);
|
|
118
|
+
text-transform: uppercase;
|
|
119
|
+
font-size: var(--bloom-font-size-tiny);
|
|
120
|
+
display: block;
|
|
124
121
|
|
|
125
122
|
&:hover {
|
|
126
|
-
|
|
123
|
+
color: var(--bloom-color-primary-dark);
|
|
127
124
|
background: transparent;
|
|
128
125
|
}
|
|
129
126
|
}
|
|
130
127
|
|
|
131
128
|
&.is-fullwidth {
|
|
132
|
-
|
|
129
|
+
width: 100%;
|
|
133
130
|
}
|
|
134
131
|
|
|
135
132
|
&.is-loading {
|
package/src/blocks/DashBlock.tsx
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from "react"
|
|
1
|
+
import React, { useContext } from "react"
|
|
2
2
|
import "./DashBlocks.scss"
|
|
3
|
+
import { NavigationContext } from "../config/NavigationContext"
|
|
3
4
|
|
|
4
5
|
interface DashBlockProps {
|
|
5
6
|
href?: string
|
|
@@ -10,6 +11,7 @@ interface DashBlockProps {
|
|
|
10
11
|
dataTestId?: string
|
|
11
12
|
}
|
|
12
13
|
const DashBlock = (props: DashBlockProps) => {
|
|
14
|
+
const { LinkComponent } = useContext(NavigationContext)
|
|
13
15
|
const { href, title, subtitle, icon, children } = props
|
|
14
16
|
let content, wrapper
|
|
15
17
|
if (children) {
|
|
@@ -24,9 +26,9 @@ const DashBlock = (props: DashBlockProps) => {
|
|
|
24
26
|
)
|
|
25
27
|
if (href) {
|
|
26
28
|
wrapper = (
|
|
27
|
-
<
|
|
29
|
+
<LinkComponent href={href} className="dash-item">
|
|
28
30
|
{header}
|
|
29
|
-
</
|
|
31
|
+
</LinkComponent>
|
|
30
32
|
)
|
|
31
33
|
} else {
|
|
32
34
|
wrapper = (
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
.dash-blocks {
|
|
2
2
|
@apply w-full;
|
|
3
|
+
@apply mb-8;
|
|
3
4
|
|
|
4
5
|
@screen md {
|
|
5
6
|
@apply flex;
|
|
@@ -8,6 +9,7 @@
|
|
|
8
9
|
}
|
|
9
10
|
|
|
10
11
|
.dash-block {
|
|
12
|
+
align-self: stretch;
|
|
11
13
|
@screen md {
|
|
12
14
|
@apply px-2;
|
|
13
15
|
flex: 50%;
|
|
@@ -24,13 +26,14 @@
|
|
|
24
26
|
@apply bg-white;
|
|
25
27
|
@apply p-4;
|
|
26
28
|
@apply pt-8;
|
|
29
|
+
@apply pb-8;
|
|
27
30
|
@apply text-tiny;
|
|
28
31
|
|
|
29
32
|
@screen md {
|
|
30
33
|
@apply rounded-lg;
|
|
31
34
|
@apply border;
|
|
32
35
|
@apply p-8;
|
|
33
|
-
@apply
|
|
36
|
+
@apply h-full;
|
|
34
37
|
}
|
|
35
38
|
|
|
36
39
|
p {
|
package/src/blocks/FormCard.tsx
CHANGED
|
@@ -14,7 +14,7 @@ const FormCard = (props: FormCardProps) => {
|
|
|
14
14
|
<article className={classNames}>
|
|
15
15
|
<div className="form-card__header">
|
|
16
16
|
<header className="form-card__header_group">
|
|
17
|
-
<
|
|
17
|
+
<h1 className="form-card__header_title">{props.header}</h1>
|
|
18
18
|
</header>
|
|
19
19
|
|
|
20
20
|
<div className="form-card__header_nav">{props.children}</div>
|
package/src/forms/FieldGroup.tsx
CHANGED
|
@@ -5,37 +5,38 @@ import { UseFormMethods, RegisterOptions } from "react-hook-form"
|
|
|
5
5
|
import { Field } from "./Field"
|
|
6
6
|
import { t } from "../helpers/translator"
|
|
7
7
|
|
|
8
|
-
interface FieldSingle {
|
|
9
|
-
|
|
10
|
-
label: string
|
|
11
|
-
value?: string
|
|
8
|
+
export interface FieldSingle {
|
|
9
|
+
additionalText?: boolean
|
|
12
10
|
dataTestId?: string
|
|
13
11
|
defaultChecked?: boolean
|
|
14
|
-
description?: React.ReactNode
|
|
15
12
|
defaultText?: string
|
|
13
|
+
description?: React.ReactNode
|
|
16
14
|
disabled?: boolean
|
|
17
|
-
|
|
15
|
+
id: string
|
|
18
16
|
inputProps?: Record<string, unknown>
|
|
17
|
+
label: string
|
|
18
|
+
uniqueName?: boolean
|
|
19
|
+
note?: string
|
|
19
20
|
subFields?: FieldSingle[]
|
|
20
21
|
type?: string
|
|
21
|
-
|
|
22
|
+
value?: string
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
interface FieldGroupProps {
|
|
26
|
+
dataTestId?: string
|
|
25
27
|
error?: boolean
|
|
26
28
|
errorMessage?: string
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
29
|
+
fieldClassName?: string
|
|
30
|
+
fieldGroupClassName?: string
|
|
31
|
+
fieldLabelClassName?: string
|
|
30
32
|
fields?: FieldSingle[]
|
|
33
|
+
groupLabel?: string
|
|
31
34
|
groupNote?: string
|
|
32
35
|
groupSubNote?: string
|
|
36
|
+
name: string
|
|
33
37
|
register: UseFormMethods["register"]
|
|
38
|
+
type?: string
|
|
34
39
|
validation?: RegisterOptions
|
|
35
|
-
fieldGroupClassName?: string
|
|
36
|
-
fieldClassName?: string
|
|
37
|
-
fieldLabelClassName?: string
|
|
38
|
-
dataTestId?: string
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
const FieldGroup = ({
|
|
@@ -75,7 +76,7 @@ const FieldGroup = ({
|
|
|
75
76
|
type={type}
|
|
76
77
|
id={item.id}
|
|
77
78
|
defaultValue={item.value || item.id}
|
|
78
|
-
name={subfieldsExist() ? `${name}-${item.value}` : name}
|
|
79
|
+
name={subfieldsExist() || item.uniqueName ? `${name}-${item.value}` : name}
|
|
79
80
|
onClick={(e) => {
|
|
80
81
|
// We cannot reliably target an individual checkbox in a field group since they have the same name, so we keep track on our own
|
|
81
82
|
if (e.currentTarget.checked) {
|
|
@@ -152,7 +153,7 @@ const FieldGroup = ({
|
|
|
152
153
|
)
|
|
153
154
|
}
|
|
154
155
|
return (
|
|
155
|
-
|
|
156
|
+
<div>
|
|
156
157
|
{groupLabel && <label className="field-label--caps">{groupLabel}</label>}
|
|
157
158
|
{groupNote && <p className="field-note mb-4">{groupNote}</p>}
|
|
158
159
|
|
|
@@ -176,7 +177,7 @@ const FieldGroup = ({
|
|
|
176
177
|
{errorMessage}
|
|
177
178
|
</ErrorMessage>
|
|
178
179
|
)}
|
|
179
|
-
|
|
180
|
+
</div>
|
|
180
181
|
)
|
|
181
182
|
}
|
|
182
183
|
|
package/src/global/app-css.scss
CHANGED
package/src/global/markdown.scss
CHANGED
|
@@ -30,4 +30,24 @@
|
|
|
30
30
|
list-style: disc;
|
|
31
31
|
@apply ml-6;
|
|
32
32
|
}
|
|
33
|
+
|
|
34
|
+
&.markdown-informational {
|
|
35
|
+
font-size: 0.9em;
|
|
36
|
+
@apply text-gray-750;
|
|
37
|
+
|
|
38
|
+
h3 {
|
|
39
|
+
@apply font-sans;
|
|
40
|
+
@apply font-bold;
|
|
41
|
+
@apply text-base;
|
|
42
|
+
@apply text-black;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
li {
|
|
46
|
+
@apply mb-4;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
a {
|
|
50
|
+
@apply underline;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
33
53
|
}
|