@thecb/components 3.0.0 → 3.1.4-beta.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 (52) hide show
  1. package/.github/workflows/disabled-workflows/publish-update.yml +73 -0
  2. package/.storybook/main.js +4 -0
  3. package/.storybook/page.js +61 -0
  4. package/.storybook/themes/apc.theme.js +1 -0
  5. package/.storybook/themes/index.js +2 -0
  6. package/.storybook/themes/sf.theme.js +1 -0
  7. package/dist/cb-components.esm.js +23576 -0
  8. package/dist/cb-components.js +94714 -0
  9. package/dist/index.cjs.js +574 -13496
  10. package/dist/index.esm.js +36084 -0
  11. package/package.json +12 -4
  12. package/rollup.config.js +0 -2
  13. package/src/components/atoms/breadcrumb/Breadcrumb.js +7 -2
  14. package/src/components/atoms/breadcrumb/Breadcrumb.theme.js +3 -1
  15. package/src/components/atoms/button-with-action/ButtonWithAction.js +6 -1
  16. package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +31 -122
  17. package/src/components/atoms/button-with-action/ButtonWithAction.theme.js +20 -7
  18. package/src/components/atoms/button-with-link/ButtonWithLink.js +17 -3
  19. package/src/components/atoms/dropdown/Dropdown.js +3 -6
  20. package/src/components/atoms/dropdown/Dropdown.stories.js +70 -0
  21. package/src/components/atoms/layouts/Box.js +0 -2
  22. package/src/components/atoms/layouts/Box.styled.js +1 -17
  23. package/src/components/atoms/layouts/Motion.styled.js +2 -5
  24. package/src/components/atoms/link/ExternalLink.js +3 -3
  25. package/src/components/atoms/link/ExternalLink.styled.js +10 -3
  26. package/src/components/atoms/link/InternalLink.js +2 -4
  27. package/src/components/atoms/link/InternalLink.styled.js +16 -15
  28. package/src/components/atoms/link/Link.theme.js +7 -1
  29. package/src/components/atoms/placeholder/Placeholder.js +2 -1
  30. package/src/components/atoms/radio-button/RadioButton.stories.js +69 -0
  31. package/src/components/atoms/text/Text.js +0 -2
  32. package/src/components/atoms/text/Text.styled.js +2 -8
  33. package/src/components/atoms/toggle-switch/ToggleSwitch.js +1 -1
  34. package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +70 -0
  35. package/src/components/molecules/account-and-routing-modal/AccountAndRoutingModal.js +0 -1
  36. package/src/components/molecules/address-form/AddressForm.stories.js +21 -0
  37. package/src/components/molecules/change-password-form/ChangePasswordForm.stories.js +22 -0
  38. package/src/components/molecules/collapsible-section/CollapsibleSection.js +1 -1
  39. package/src/components/molecules/edit-name-form/EdidNameForm.stories.js +24 -0
  40. package/src/components/molecules/email-form/EmailForm.stories.js +24 -0
  41. package/src/components/molecules/forgot-password-form/ForgotPasswordForm.stories.js +24 -0
  42. package/src/components/molecules/login-form/LoginForm.stories.js +24 -0
  43. package/src/components/molecules/payment-form-card/PaymentFormCard.js +0 -16
  44. package/src/components/molecules/phone-form/PhoneForm.stories.js +24 -0
  45. package/src/components/molecules/radio-section/RadioSection.js +1 -1
  46. package/src/components/molecules/registration-form/RegistrationForm.stories.js +24 -0
  47. package/src/components/molecules/reset-confirmation-form/ResetConfirmationForm.stories.js +11 -0
  48. package/src/components/molecules/reset-password-form/ResetPasswordForm.stories.js +24 -0
  49. package/src/components/molecules/reset-password-success/ResetPasswordSuccess.stories.js +11 -0
  50. package/src/components/molecules/tab-sidebar/TabSidebar.js +11 -5
  51. package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +0 -1
  52. package/.github/workflows/publish-update.yml +0 -73
@@ -9,14 +9,12 @@ const InternalLink = ({
9
9
  to = "",
10
10
  color,
11
11
  children,
12
- activeStyles,
13
12
  active,
14
13
  fontSize,
15
14
  lineheight,
16
15
  fontWeight,
17
16
  variant = "primary",
18
17
  margin,
19
- hoverStyles,
20
18
  tabIndex = "0",
21
19
  extraStyles = ``
22
20
  }) => {
@@ -33,13 +31,13 @@ const InternalLink = ({
33
31
  to={to}
34
32
  color={color}
35
33
  lineheight={lineheight}
36
- activeStyles={activeStyles}
37
34
  active={active}
38
35
  fontWeight={fontWeight}
39
36
  fontSize={fontSize}
40
37
  fontFamily={themeValues.fontFamily}
41
38
  margin={margin}
42
- hoverStyles={hoverStyles}
39
+ hoverColor={themeValues.hoverColor}
40
+ activeColor={themeValues.activeColor}
43
41
  tabIndex={tabIndex}
44
42
  extrastyles={extraStyles}
45
43
  >
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- import styled, { css } from "styled-components";
2
+ import styled from "styled-components";
3
3
  import { Link } from "react-router-dom";
4
4
 
5
5
  /*
@@ -9,30 +9,31 @@ import { Link } from "react-router-dom";
9
9
 
10
10
  /* eslint-disable no-unused-vars */
11
11
  export const StyledInternalLink = styled(
12
- ({ hoverStyles, activeStyles, active, ...props }) => <Link {...props} />
12
+ ({ hoverColor, activeColor, active, color, extrastyles, ...props }) => (
13
+ <Link {...props} />
14
+ )
13
15
  )`
14
16
  display: flex;
15
- color: ${({ color }) => color};
17
+ color: ${({ color, active, activeColor }) =>
18
+ active === "true" ? activeColor : color};
16
19
  font-weight: ${({ fontWeight }) => fontWeight};
17
20
  line-height: ${({ lineheight }) => lineheight};
18
21
  font-size: ${({ fontSize }) => fontSize};
19
22
  font-family: ${({ fontFamily }) => fontFamily};
20
23
  margin: ${({ margin }) => margin};
24
+ text-decoration: ${({ active }) =>
25
+ active === "true" ? "underline" : "none"};
21
26
 
22
- &:hover {
23
- ${({ hoverStyles }) =>
24
- css`
25
- ${hoverStyles}
26
- `}
27
+ &:hover,
28
+ &:focus {
29
+ color: ${({ hoverColor }) => hoverColor};
30
+ text-decoration: underline;
27
31
  }
28
32
 
29
- ${({ activeStyles, active }) =>
30
- active === "true" &&
31
- css`
32
- ${activeStyles}
33
- cursor: default;
34
- pointer-events: none;
35
- `}
33
+ &:active {
34
+ text-decoration: underline;
35
+ color: ${({ activeColor }) => activeColor};
36
+ }
36
37
 
37
38
  ${({ extrastyles }) => extrastyles}
38
39
  `;
@@ -3,6 +3,12 @@ const fontFamily = {
3
3
  secondary: "Open Sans"
4
4
  };
5
5
 
6
+ const hoverColor = "#116285";
7
+
8
+ const activeColor = "#0E506D";
9
+
6
10
  export const fallbackValues = {
7
- fontFamily
11
+ fontFamily,
12
+ hoverColor,
13
+ activeColor
8
14
  };
@@ -6,7 +6,7 @@ import { Box, Switcher, Center, Cluster } from "../layouts";
6
6
  import { fallbackValues } from "./Placeholder.theme";
7
7
  import { themeComponent } from "../../../util/themeUtils";
8
8
  import { IconAdd } from "../../../deprecated/icons";
9
- import { STORM_GREY } from "../../../constants/colors";
9
+ import { STORM_GREY, GRECIAN_GREY } from "../../../constants/colors";
10
10
  import { AccountsAddIcon, PropertiesAddIcon } from "../icons";
11
11
  import { FONT_WEIGHT_REGULAR } from "../../../constants/style_constants";
12
12
  import withWindowSize from "../../withWindowSize";
@@ -72,6 +72,7 @@ const Placeholder = ({
72
72
  display: flex;
73
73
  justify-content: center;
74
74
  align-items:center;`}
75
+ hoverStyles={`background-color: ${GRECIAN_GREY};`}
75
76
  >
76
77
  <PlaceholderContentWrapper
77
78
  isLink={isLink}
@@ -0,0 +1,69 @@
1
+ import React, { useState } from "react";
2
+ import { withKnobs, text, radios } from "@storybook/addon-knobs";
3
+ import RadioButton from "./RadioButton";
4
+ import { Box, Cover, Center } from "../layouts";
5
+ import { ThemeProvider } from "styled-components";
6
+
7
+ const fakeTheme = {
8
+ RadioButton: {
9
+ activeColor: "#15749D",
10
+ inactiveColor: "#959CA8"
11
+ }
12
+ };
13
+
14
+ export default {
15
+ title: "Radio Button",
16
+ component: RadioButton,
17
+ decorators: [
18
+ withKnobs,
19
+ storyFn => (
20
+ <ThemeProvider
21
+ theme={{
22
+ name: text("Theme Name", "default"),
23
+ values: fakeTheme
24
+ }}
25
+ >
26
+ <Cover>
27
+ <div />
28
+ <Center>{storyFn()}</Center>
29
+ <div />
30
+ </Cover>
31
+ </ThemeProvider>
32
+ )
33
+ ]
34
+ };
35
+
36
+ export const radioButtonsDefault = () => {
37
+ const buttons = 3;
38
+
39
+ const [selected, setSelected] = useState(null);
40
+ const [focused, setFocused] = useState(null);
41
+
42
+ return [...Array(buttons).keys()].map(i => {
43
+ const name = `radio-button-${i}`;
44
+ return (
45
+ <Box
46
+ key={name}
47
+ onFocus={() => setFocused(name)}
48
+ onBlur={() => setFocused(null)}
49
+ extraStyles="outline: none;"
50
+ tabIndex="0"
51
+ >
52
+ <RadioButton
53
+ name={name}
54
+ radioOn={selected === name}
55
+ radioFocused={focused === name}
56
+ toggleRadio={() => setSelected(name)}
57
+ disabled={
58
+ radios(
59
+ "Disable Radio Buttons",
60
+ { Enabled: "enabled", Disabled: "disabled" },
61
+ "enabled",
62
+ "RADIO-GROUP-1"
63
+ ) === "disabled"
64
+ }
65
+ />
66
+ </Box>
67
+ );
68
+ });
69
+ };
@@ -12,7 +12,6 @@ const Text = ({
12
12
  color = FIREFLY_GREY,
13
13
  extraStyles = ``,
14
14
  hoverStyles,
15
- focusStyles,
16
15
  onClick,
17
16
  dataQa,
18
17
  children,
@@ -25,7 +24,6 @@ const Text = ({
25
24
  fontFamily={themeValues.fontFamily}
26
25
  extraStyles={extraStyles}
27
26
  hoverStyles={hoverStyles}
28
- focusStyles={focusStyles}
29
27
  onClick={onClick}
30
28
  data-qa={dataQa}
31
29
  {...rest}
@@ -8,20 +8,14 @@ export const TextSpan = styled.span`
8
8
  font-family: ${({ fontFamily }) => fontFamily};
9
9
  color: ${({ color }) => color};
10
10
 
11
- &:hover {
11
+ &:hover,
12
+ &:focus {
12
13
  ${({ hoverStyles }) =>
13
14
  css`
14
15
  ${hoverStyles}
15
16
  `}
16
17
  }
17
18
 
18
- &:focus {
19
- ${({ focusStyles }) =>
20
- css`
21
- ${focusStyles}
22
- `}
23
- }
24
-
25
19
  ${({ disabled, disabledStyles }) =>
26
20
  disabled &&
27
21
  css`
@@ -7,6 +7,7 @@ import Heading from "../heading";
7
7
  import { Box, Center, Cover, Cluster } from "../layouts";
8
8
  import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
9
9
  import { CHARADE_GREY } from "../../../constants/colors";
10
+ import { noop } from "../../../util/general";
10
11
 
11
12
  const HiddenToggleSwitchBox = styled.input`
12
13
  opacity: 0;
@@ -159,7 +160,6 @@ const ToggleSwitch = ({
159
160
  extraStyles={
160
161
  labelLeft ? themeValues.leftLabelStyles : themeValues.rightLabelStyles
161
162
  }
162
- focusStyles={`outline: ${themeValues.onBackground} auto 5px`}
163
163
  >
164
164
  <Center>
165
165
  <Cluster justify="stretch" align="center">
@@ -0,0 +1,70 @@
1
+ import React, { useState, Fragment } from "react";
2
+ import { withKnobs, text, radios } from "@storybook/addon-knobs";
3
+ import ToggleSwitch from "./ToggleSwitch";
4
+ import { Cover, Center, Stack } from "../layouts";
5
+ import { ThemeProvider } from "styled-components";
6
+
7
+ const fakeTheme = {
8
+ ToggleSwitch: {
9
+ onBackground: "#15749D",
10
+ disabledBackground: "#D5D8DC",
11
+ white: "white",
12
+ offBackground: "#959EA7",
13
+ rightLabelStyles: `display: flex;
14
+ justify-content: flex-start;
15
+ align-items: center;
16
+ flex-direction: row;`,
17
+ leftLabelStyles: `display: flex;
18
+ justify-content: flex-start;
19
+ align-items: center;
20
+ flex-direction: row-reverse;`
21
+ }
22
+ };
23
+
24
+ export default {
25
+ title: "Toggle Switch",
26
+ component: ToggleSwitch,
27
+ decorators: [
28
+ withKnobs,
29
+ storyFn => (
30
+ <ThemeProvider
31
+ theme={{
32
+ name: text("Theme Name", "default"),
33
+ values: fakeTheme
34
+ }}
35
+ >
36
+ <Cover>
37
+ <div />
38
+ <Center>
39
+ <Stack>{storyFn()}</Stack>
40
+ </Center>
41
+ <div />
42
+ </Cover>
43
+ </ThemeProvider>
44
+ )
45
+ ]
46
+ };
47
+
48
+ export const toggleSwitchDefault = () => {
49
+ const [isOn, onToggle] = useState(false);
50
+
51
+ const disabled =
52
+ radios(
53
+ "Disable Toggle Switch",
54
+ { Enabled: "enabled", Disabled: "disabled" },
55
+ "enabled",
56
+ "RADIO-GROUP-1"
57
+ ) === "disabled";
58
+
59
+ return (
60
+ <Fragment>
61
+ <ToggleSwitch
62
+ name="toggle-switch"
63
+ label="Toggle Switch Label"
64
+ isOn={isOn}
65
+ onToggle={() => onToggle(!isOn)}
66
+ disabled={disabled}
67
+ />
68
+ </Fragment>
69
+ );
70
+ };
@@ -27,7 +27,6 @@ const AccountAndRoutingModal = ({
27
27
  color={themeValues.linkColor}
28
28
  weight={themeValues.fontWeight}
29
29
  hoverStyles={themeValues.modalLinkHoverFocus}
30
- focusStyles={themeValues.modalLinkHoverFocus}
31
30
  extraStyles={`cursor: pointer;`}
32
31
  tabIndex="0"
33
32
  onKeyPress={e => e.key === "Enter" && toggleOpen(true)}
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { connect } from "react-redux";
3
+
4
+ import AddressForm from "./AddressForm";
5
+ import page from "../../../../.storybook/page";
6
+ import * as AddressFormState from "./AddressForm.state";
7
+
8
+ const story = page({
9
+ title: "Components|Molecules/AddressForm",
10
+ Component: AddressForm,
11
+ reducer: AddressFormState.reducer,
12
+ mapStateToProps: AddressFormState.mapStateToProps,
13
+ mapDispatchToProps: AddressFormState.mapDispatchToProps
14
+ });
15
+ export default story;
16
+
17
+ const ConnectedForm = connect(
18
+ AddressFormState.mapStateToProps,
19
+ AddressFormState.mapDispatchToProps
20
+ )(AddressForm);
21
+ export const addressForm = () => <ConnectedForm />;
@@ -0,0 +1,22 @@
1
+ import React from "react";
2
+ import { connect } from "react-redux";
3
+ import { boolean } from "@storybook/addon-knobs";
4
+
5
+ import ChangePasswordForm from "./ChangePasswordForm";
6
+ import page from "../../../../.storybook/page";
7
+ import * as ChangePasswordFormState from "./ChangePasswordForm.state";
8
+
9
+ const story = page({
10
+ title: "Components|Molecules/ChangePasswordForm",
11
+ Component: ChangePasswordForm,
12
+ reducer: ChangePasswordFormState.reducer
13
+ });
14
+ export default story;
15
+
16
+ const ConnectedForm = connect(
17
+ ChangePasswordFormState.mapStateToProps,
18
+ ChangePasswordFormState.mapDispatchToProps
19
+ )(ChangePasswordForm);
20
+ export const changePasswordForm = () => (
21
+ <ConnectedForm showErrors={boolean("showErrors", false, "props")} />
22
+ );
@@ -63,7 +63,7 @@ const CollapsibleSection = ({
63
63
  padding="0"
64
64
  tabIndex="0"
65
65
  onKeyDown={handleKeyDown}
66
- focusStyles={themeValues.focusStyles}
66
+ hoverStyles={themeValues.focusStyles}
67
67
  animate={isOpen ? "open" : "closed"}
68
68
  positionTransition
69
69
  >
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { connect } from "react-redux";
3
+ import { boolean } from "@storybook/addon-knobs";
4
+
5
+ import EditNameForm from "./EditNameForm";
6
+ import page from "../../../../.storybook/page";
7
+ import * as EditNameFormState from "./EditNameForm.state";
8
+
9
+ const story = page({
10
+ title: "Components|Molecules/EditNameForm",
11
+ Component: EditNameForm,
12
+ reducer: EditNameFormState.reducer,
13
+ mapStateToProps: EditNameFormState.mapStateToProps,
14
+ mapDispatchToProps: EditNameFormState.mapDispatchToProps
15
+ });
16
+ export default story;
17
+
18
+ const ConnectedForm = connect(
19
+ EditNameFormState.mapStateToProps,
20
+ EditNameFormState.mapDispatchToProps
21
+ )(EditNameForm);
22
+ export const editNameForm = () => (
23
+ <ConnectedForm showErrors={boolean("showErrors", false, "props")} />
24
+ );
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { connect } from "react-redux";
3
+ import { boolean } from "@storybook/addon-knobs";
4
+
5
+ import EmailForm from "./EmailForm";
6
+ import page from "../../../../.storybook/page";
7
+ import * as EmailFormState from "./EmailForm.state";
8
+
9
+ const story = page({
10
+ title: "Components|Molecules/EmailForm",
11
+ Component: EmailForm,
12
+ reducer: EmailFormState.reducer,
13
+ mapStateToProps: EmailFormState.mapStateToProps,
14
+ mapDispatchToProps: EmailFormState.mapDispatchToProps
15
+ });
16
+ export default story;
17
+
18
+ const ConnectedForm = connect(
19
+ EmailFormState.mapStateToProps,
20
+ EmailFormState.mapDispatchToProps
21
+ )(EmailForm);
22
+ export const emailForm = () => (
23
+ <ConnectedForm showErrors={boolean("showErrors", false, "props")} />
24
+ );
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { connect } from "react-redux";
3
+ import { boolean } from "@storybook/addon-knobs";
4
+
5
+ import ForgotPasswordForm from "./ForgotPasswordForm";
6
+ import page from "../../../../.storybook/page";
7
+ import * as ForgotPasswordFormState from "./ForgotPasswordForm.state";
8
+
9
+ const story = page({
10
+ title: "Components|Molecules/ForgotPasswordForm",
11
+ Component: ForgotPasswordForm,
12
+ reducer: ForgotPasswordFormState.reducer,
13
+ mapStateToProps: ForgotPasswordFormState.mapStateToProps,
14
+ mapDispatchToProps: ForgotPasswordFormState.mapDispatchToProps
15
+ });
16
+ export default story;
17
+
18
+ const ConnectedForm = connect(
19
+ ForgotPasswordFormState.mapStateToProps,
20
+ ForgotPasswordFormState.mapDispatchToProps
21
+ )(ForgotPasswordForm);
22
+ export const forgotPasswordForm = () => (
23
+ <ConnectedForm showErrors={boolean("showErrors", false, "props")} />
24
+ );
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { connect } from "react-redux";
3
+ import { boolean } from "@storybook/addon-knobs";
4
+
5
+ import LoginForm from "./LoginForm";
6
+ import page from "../../../../.storybook/page";
7
+ import * as LoginFormState from "./LoginForm.state";
8
+
9
+ const story = page({
10
+ title: "Components|Molecules/LoginForm",
11
+ Component: LoginForm,
12
+ reducer: LoginFormState.reducer,
13
+ mapStateToProps: LoginFormState.mapStateToProps,
14
+ mapDispatchToProps: LoginFormState.mapDispatchToProps
15
+ });
16
+ export default story;
17
+
18
+ const ConnectedForm = connect(
19
+ LoginFormState.mapStateToProps,
20
+ LoginFormState.mapDispatchToProps
21
+ )(LoginForm);
22
+ export const loginForm = () => (
23
+ <ConnectedForm showErrors={boolean("showErrors", false, "props")} />
24
+ );
@@ -108,22 +108,6 @@ const PaymentFormCard = ({
108
108
  />
109
109
  </Box>
110
110
  )}
111
- {!!fees?.value && (
112
- <Alert
113
- heading="Processing Fee"
114
- text={`There is a processing fee of ${
115
- fees.type === "FLAT"
116
- ? `${displayCurrency(fees.value)}`
117
- : `${fees.value * 100}%`
118
- } ${ifElse(
119
- isNil,
120
- always(""),
121
- a => `with a minimum of ${displayCurrency(a)} `
122
- )(fees.minimumInCents)} on all card payments.`}
123
- variant="info"
124
- showQuitLink={false}
125
- />
126
- )}
127
111
  </FormInputColumn>
128
112
  </FormContainer>
129
113
  );
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { connect } from "react-redux";
3
+ import { boolean } from "@storybook/addon-knobs";
4
+
5
+ import PhoneForm from "./PhoneForm";
6
+ import page from "../../../../.storybook/page";
7
+ import * as PhoneFormState from "./PhoneForm.state";
8
+
9
+ const story = page({
10
+ title: "Components|Molecules/PhoneForm",
11
+ Component: PhoneForm,
12
+ reducer: PhoneFormState.reducer,
13
+ mapStateToProps: PhoneFormState.mapStateToProps,
14
+ mapDispatchToProps: PhoneFormState.mapDispatchToProps
15
+ });
16
+ export default story;
17
+
18
+ const ConnectedForm = connect(
19
+ PhoneFormState.mapStateToProps,
20
+ PhoneFormState.mapDispatchToProps
21
+ )(PhoneForm);
22
+ export const phoneForm = () => (
23
+ <ConnectedForm showErrors={boolean("showErrors", false, "props")} />
24
+ );
@@ -103,7 +103,7 @@ const RadioSection = ({
103
103
  onKeyDown={e => handleKeyDown(section.id, e)}
104
104
  onFocus={() => setFocused(section.id)}
105
105
  onBlur={() => setFocused(null)}
106
- focusStyles={themeValues.focusStyles}
106
+ hoverStyles={themeValues.focusStyles}
107
107
  animate={openSection === section.id ? "open" : "closed"}
108
108
  initial={initiallyOpen ? "open" : "closed"}
109
109
  key={`item-${section.id}`}
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { connect } from "react-redux";
3
+ import { boolean } from "@storybook/addon-knobs";
4
+
5
+ import RegistrationForm from "./RegistrationForm";
6
+ import page from "../../../../.storybook/page";
7
+ import * as RegistrationFormState from "./RegistrationForm.state";
8
+
9
+ const story = page({
10
+ title: "Components|Molecules/RegistrationForm",
11
+ Component: RegistrationForm,
12
+ reducer: RegistrationFormState.reducer,
13
+ mapStateToProps: RegistrationFormState.mapStateToProps,
14
+ mapDispatchToProps: RegistrationFormState.mapDispatchToProps
15
+ });
16
+ export default story;
17
+
18
+ const ConnectedForm = connect(
19
+ RegistrationFormState.mapStateToProps,
20
+ RegistrationFormState.mapDispatchToProps
21
+ )(RegistrationForm);
22
+ export const registrationForm = () => (
23
+ <ConnectedForm showErrors={boolean("showErrors", false, "props")} />
24
+ );
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+
3
+ import ResetConfirmationForm from "./ResetConfirmationForm";
4
+ import page from "../../../../.storybook/page";
5
+
6
+ const story = page({
7
+ title: "Components|Molecules/ResetConfirmationForm",
8
+ Component: ResetConfirmationForm
9
+ });
10
+ export default story;
11
+ export const resetConfirmationForm = () => <ResetConfirmationForm />;
@@ -0,0 +1,24 @@
1
+ import React from "react";
2
+ import { connect } from "react-redux";
3
+ import { boolean } from "@storybook/addon-knobs";
4
+
5
+ import ResetPasswordForm from "./ResetPasswordForm";
6
+ import page from "../../../../.storybook/page";
7
+ import * as ResetPasswordFormState from "./ResetPasswordForm.state";
8
+
9
+ const story = page({
10
+ title: "Components|Molecules/ResetPasswordForm",
11
+ Component: ResetPasswordForm,
12
+ reducer: ResetPasswordFormState.reducer,
13
+ mapStateToProps: ResetPasswordFormState.mapStateToProps,
14
+ mapDispatchToProps: ResetPasswordFormState.mapDispatchToProps
15
+ });
16
+ export default story;
17
+
18
+ const ConnectedForm = connect(
19
+ ResetPasswordFormState.mapStateToProps,
20
+ ResetPasswordFormState.mapDispatchToProps
21
+ )(ResetPasswordForm);
22
+ export const resetPasswordForm = () => (
23
+ <ConnectedForm showErrors={boolean("showErrors", false, "props")} />
24
+ );
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+
3
+ import ResetPasswordSuccess from "./ResetPasswordSuccess";
4
+ import page from "../../../../.storybook/page";
5
+
6
+ const story = page({
7
+ title: "Components|Molecules/ResetPasswordSuccess",
8
+ Component: ResetPasswordSuccess
9
+ });
10
+ export default story;
11
+ export const resetPasswordSuccess = () => <ResetPasswordSuccess />;
@@ -34,11 +34,17 @@ const TabSidebar = ({ links, isMobile, themeValues }) => (
34
34
  <InternalLink
35
35
  to={route}
36
36
  key={`${route}-${index}`}
37
- hoverStyles={
38
- active
39
- ? `> * {background-color: ${themeValues.activeTabHover};}`
40
- : `> * {background-color: rgba(8, 27, 43, 0.05);}`
41
- }
37
+ extraStyles={`&:hover, &:focus {
38
+ text-decoration: none;
39
+ ${
40
+ active
41
+ ? `> * {
42
+ background-color: ${themeValues.activeTabHover};
43
+ }`
44
+ : `> * {
45
+ background-color: rgba(8, 27, 43, 0.05);
46
+ }`
47
+ }}`}
42
48
  >
43
49
  <Box
44
50
  padding={isMobile ? "6px 4px" : "18px 16px"}
@@ -24,7 +24,6 @@ const TermsAndConditionsModal = ({
24
24
  color={themeValues.linkColor}
25
25
  weight={themeValues.fontWeight}
26
26
  hoverStyles={themeValues.modalLinkHoverFocus}
27
- focusStyles={themeValues.modalLinkHoverFocus}
28
27
  extraStyles={`cursor: pointer;`}
29
28
  tabIndex="0"
30
29
  onKeyPress={e => e.key === "Enter" && toggleOpen(true)}