@thecb/components 3.3.0 → 3.3.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.
- package/dist/index.cjs.js +1590 -27
- package/package.json +2 -2
- package/src/components/atoms/add-obligation/AddObligation.js +5 -0
- package/src/components/molecules/email-form/EmailForm.js +1 -14
- package/src/components/molecules/email-form/EmailForm.state.js +1 -9
- package/src/components/molecules/nav-menu/NavMenu.theme.js +3 -1
- package/src/components/molecules/nav-menu/NavMenuDesktop.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thecb/components",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.3",
|
|
4
4
|
"description": "Common lib for CityBase react components",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/index.esm.js",
|
|
@@ -61,7 +61,6 @@
|
|
|
61
61
|
"styled-theming": "^2.2.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"ramda": "^0.27.0",
|
|
65
64
|
"react": "^16.13.1",
|
|
66
65
|
"react-dom": "^16.13.1",
|
|
67
66
|
"react-router-dom": "6.0.0-alpha.3",
|
|
@@ -74,6 +73,7 @@
|
|
|
74
73
|
}
|
|
75
74
|
},
|
|
76
75
|
"dependencies": {
|
|
76
|
+
"ramda": "^0.27.0",
|
|
77
77
|
"formatted-input": "^0.1.3",
|
|
78
78
|
"framer-motion": "^1.11.0",
|
|
79
79
|
"numeral": "^2.0.6",
|
|
@@ -17,12 +17,16 @@ const AddObligation = ({
|
|
|
17
17
|
&:hover {
|
|
18
18
|
.fill { fill: ${themeValues.hoverColor}; }
|
|
19
19
|
.stroke { stroke: ${themeValues.hoverColor}; }
|
|
20
|
+
button { text-decoration: underline; text-decoration-color: ${themeValues.hoverColor}; }
|
|
21
|
+
span { color: ${themeValues.hoverColor}; }
|
|
20
22
|
}`;
|
|
21
23
|
|
|
22
24
|
const activeStyles = `
|
|
23
25
|
&:active {
|
|
24
26
|
.fill { fill: ${themeValues.activeColor}; }
|
|
25
27
|
.stroke { stroke: ${themeValues.activeColor}; }
|
|
28
|
+
button { text-decoration: underline; text-decoration-color: ${themeValues.activeColor}; }
|
|
29
|
+
span { color: ${themeValues.activeColor}; }
|
|
26
30
|
}`;
|
|
27
31
|
|
|
28
32
|
const defaultStyles = `
|
|
@@ -37,6 +41,7 @@ const AddObligation = ({
|
|
|
37
41
|
hoverStyles={hoverStyles}
|
|
38
42
|
activeStyles={activeStyles}
|
|
39
43
|
extraStyles={defaultStyles}
|
|
44
|
+
onClick={action}
|
|
40
45
|
>
|
|
41
46
|
<Cover singleChild minHeight="100%">
|
|
42
47
|
<Cluster justify="center" align="center" minHeight="100%">
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { useEffect } from "react";
|
|
2
|
-
import { required,
|
|
2
|
+
import { required, isProbablyEmail } from "redux-freeform";
|
|
3
3
|
import {
|
|
4
4
|
FormInput,
|
|
5
5
|
FormContainer,
|
|
@@ -22,10 +22,6 @@ const EmailForm = ({
|
|
|
22
22
|
[required.error]: "Email is required",
|
|
23
23
|
[isProbablyEmail.error]: "Invalid email address"
|
|
24
24
|
};
|
|
25
|
-
const confirmEmailFieldErrorMessages = {
|
|
26
|
-
[matchesField.error]: "Confirm email must match email",
|
|
27
|
-
[required.error]: "Confirm email must match email"
|
|
28
|
-
};
|
|
29
25
|
|
|
30
26
|
return (
|
|
31
27
|
<FormContainer variant={variant} role="form" aria-label="Email">
|
|
@@ -39,15 +35,6 @@ const EmailForm = ({
|
|
|
39
35
|
showErrors={showErrors}
|
|
40
36
|
onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
|
|
41
37
|
/>
|
|
42
|
-
<FormInput
|
|
43
|
-
labelTextWhenNoError="Confirm email"
|
|
44
|
-
errorMessages={confirmEmailFieldErrorMessages}
|
|
45
|
-
type="email"
|
|
46
|
-
field={fields.confirmEmail}
|
|
47
|
-
fieldActions={actions.fields.confirmEmail}
|
|
48
|
-
showErrors={showErrors}
|
|
49
|
-
onKeyDown={e => e.key === "Enter" && handleSubmit(e)}
|
|
50
|
-
/>
|
|
51
38
|
</FormInputColumn>
|
|
52
39
|
</FormContainer>
|
|
53
40
|
);
|
|
@@ -1,16 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
createFormState,
|
|
3
|
-
required,
|
|
4
|
-
matchesField,
|
|
5
|
-
isProbablyEmail
|
|
6
|
-
} from "redux-freeform";
|
|
1
|
+
import { createFormState, required, isProbablyEmail } from "redux-freeform";
|
|
7
2
|
|
|
8
3
|
const formConfig = {
|
|
9
4
|
email: {
|
|
10
5
|
validators: [required(), isProbablyEmail()]
|
|
11
|
-
},
|
|
12
|
-
confirmEmail: {
|
|
13
|
-
validators: [required(), matchesField("email")]
|
|
14
6
|
}
|
|
15
7
|
};
|
|
16
8
|
|
|
@@ -24,7 +24,7 @@ const NavMenuDesktop = ({
|
|
|
24
24
|
extraStyles={`position: relative; ${menuCarat}`}
|
|
25
25
|
background={themeValues.backgroundColor}
|
|
26
26
|
borderRadius="5px"
|
|
27
|
-
boxShadow={`0px 3px 8px 0px ${themeValues.
|
|
27
|
+
boxShadow={`0px 3px 8px 0px ${themeValues.shadowColor}, 0px 2px 14px 0px ${themeValues.shadowColor};`}
|
|
28
28
|
onMouseEnter={onMouseEnter}
|
|
29
29
|
onMouseLeave={onMouseLeave}
|
|
30
30
|
onFocus={onFocus}
|