@thecb/components 10.4.0-beta.1 → 10.4.0-beta.10
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 +147 -114
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +147 -114
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/badge/Badge.theme.js +2 -2
- package/src/components/atoms/button-with-action/ButtonWithAction.js +1 -1
- package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +27 -9
- package/src/components/atoms/button-with-action/ButtonWithAction.theme.js +9 -10
- package/src/components/atoms/placeholder/Placeholder.js +73 -86
- package/src/components/molecules/link-card/LinkCard.js +15 -4
- package/src/components/molecules/link-card/LinkCard.stories.js +40 -36
- package/src/components/molecules/link-card/LinkCard.styled.js +41 -32
- package/src/components/molecules/link-card/LinkCard.theme.js +16 -8
- package/src/components/molecules/obligation/Obligation.js +5 -4
- package/src/components/molecules/obligation/modules/AmountModule.js +13 -1
- package/src/components/molecules/obligation/modules/AmountModule.stories.js +3 -0
- package/src/components/molecules/obligation/modules/AutopayModalModule.js +18 -15
- package/src/components/molecules/obligation/modules/InactiveControlsModule.js +13 -4
- package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +32 -25
- package/src/components/molecules/obligation/modules/RemoveAccountModalModule.js +10 -8
package/package.json
CHANGED
|
@@ -135,7 +135,7 @@ const ButtonWithAction = forwardRef(
|
|
|
135
135
|
disabledStyles={disabledStyles}
|
|
136
136
|
aria-disabled={disabled}
|
|
137
137
|
as="button"
|
|
138
|
-
onClick={isLoading || disabled ?
|
|
138
|
+
onClick={isLoading || disabled ? noop : action}
|
|
139
139
|
borderRadius="2px"
|
|
140
140
|
theme={themeContext}
|
|
141
141
|
extraStyles={`margin: 0.5rem; ${extraStyles}`}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { Fragment, useState } from "react";
|
|
2
2
|
import { text, select, boolean } from "@storybook/addon-knobs";
|
|
3
|
+
import { Box } from "../layouts";
|
|
3
4
|
import ButtonWithAction from "./ButtonWithAction";
|
|
4
5
|
import page from "../../../../.storybook/page";
|
|
5
6
|
|
|
@@ -14,21 +15,38 @@ const variants = {
|
|
|
14
15
|
smallGhost: "smallGhost",
|
|
15
16
|
tertiary: "tertiary",
|
|
16
17
|
danger: "danger",
|
|
18
|
+
dangerSecondary: "dangerSecondary",
|
|
19
|
+
whiteSecondary: "whiteSecondary",
|
|
20
|
+
whitePrimary: "whitePrimary",
|
|
17
21
|
None: undefined
|
|
18
22
|
};
|
|
19
23
|
const defaultValue = "primary";
|
|
20
24
|
const groupId = "props";
|
|
21
25
|
|
|
22
|
-
const buttonHandler = () =>
|
|
26
|
+
const buttonHandler = () => window.alert("Button click!");
|
|
23
27
|
|
|
24
28
|
export const buttonWithAction = () => (
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
<Fragment>
|
|
30
|
+
{/* Uncomment to view buttons on a dark background */}
|
|
31
|
+
{/* <Box extraStyles="background-color: #000;">
|
|
32
|
+
<ButtonWithAction
|
|
33
|
+
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
34
|
+
disabled={boolean("disabled", false, "props")}
|
|
35
|
+
text={text("text", "button", "props")}
|
|
36
|
+
isLoading={boolean("isLoading", false, "props")}
|
|
37
|
+
action={text("action", buttonHandler, "props")}
|
|
38
|
+
/>
|
|
39
|
+
</Box> */}
|
|
40
|
+
<Box extraStyles="background-color: #fff;">
|
|
41
|
+
<ButtonWithAction
|
|
42
|
+
variant={select(variantsLabel, variants, defaultValue, groupId)}
|
|
43
|
+
disabled={boolean("disabled", false, "props")}
|
|
44
|
+
text={text("text", "button", "props")}
|
|
45
|
+
isLoading={boolean("isLoading", false, "props")}
|
|
46
|
+
action={text("action", buttonHandler, "props")}
|
|
47
|
+
/>
|
|
48
|
+
</Box>
|
|
49
|
+
</Fragment>
|
|
32
50
|
);
|
|
33
51
|
|
|
34
52
|
const story = page({
|
|
@@ -8,25 +8,24 @@ const {
|
|
|
8
8
|
MANATEE_GREY,
|
|
9
9
|
MATISSE_BLUE,
|
|
10
10
|
RASPBERRY,
|
|
11
|
-
ERROR_COLOR
|
|
12
|
-
STORM_GREY
|
|
11
|
+
ERROR_COLOR
|
|
13
12
|
} = colors;
|
|
14
13
|
|
|
15
14
|
const { LINK_TEXT_DECORATION } = styleConstants;
|
|
16
15
|
|
|
17
16
|
const disabledBorderColor = {
|
|
18
|
-
primary:
|
|
19
|
-
secondary:
|
|
17
|
+
primary: MANATEE_GREY,
|
|
18
|
+
secondary: MANATEE_GREY,
|
|
20
19
|
back: TRANSPARENT,
|
|
21
|
-
smallPrimary:
|
|
22
|
-
smallSecondary:
|
|
20
|
+
smallPrimary: MANATEE_GREY,
|
|
21
|
+
smallSecondary: MANATEE_GREY,
|
|
23
22
|
smallGhost: TRANSPARENT,
|
|
24
23
|
ghost: TRANSPARENT,
|
|
25
24
|
tertiary: TRANSPARENT,
|
|
26
|
-
danger:
|
|
27
|
-
dangerSecondary:
|
|
28
|
-
whiteSecondary:
|
|
29
|
-
whitePrimary:
|
|
25
|
+
danger: MANATEE_GREY,
|
|
26
|
+
dangerSecondary: MANATEE_GREY,
|
|
27
|
+
whiteSecondary: MANATEE_GREY,
|
|
28
|
+
whitePrimary: MANATEE_GREY
|
|
30
29
|
};
|
|
31
30
|
|
|
32
31
|
const disabledColor = {
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
PaymentMethodAddIcon
|
|
18
18
|
} from "../icons";
|
|
19
19
|
import { FONT_WEIGHT_REGULAR } from "../../../constants/style_constants";
|
|
20
|
-
import { noop } from "../../../util/general";
|
|
21
20
|
|
|
22
21
|
const getLargeIcon = iconName => {
|
|
23
22
|
switch (iconName) {
|
|
@@ -37,27 +36,21 @@ const PlaceholderContentWrapper = ({
|
|
|
37
36
|
action,
|
|
38
37
|
destination,
|
|
39
38
|
children,
|
|
40
|
-
dataQa
|
|
41
|
-
disabled = false
|
|
39
|
+
dataQa
|
|
42
40
|
}) =>
|
|
43
41
|
isLink ? (
|
|
44
42
|
<Link to={destination} data-qa={dataQa} style={{ textDecoration: "none" }}>
|
|
45
|
-
<Box
|
|
46
|
-
padding="0"
|
|
47
|
-
minHeight="100%"
|
|
48
|
-
extraStyles={disabled ? `cursor: default;` : `cursor: pointer;`}
|
|
49
|
-
>
|
|
43
|
+
<Box padding="0" minHeight="100%" extraStyles={`cursor: pointer;`}>
|
|
50
44
|
{children}
|
|
51
45
|
</Box>
|
|
52
46
|
</Link>
|
|
53
47
|
) : (
|
|
54
48
|
<Box
|
|
55
|
-
onClick={
|
|
49
|
+
onClick={action}
|
|
56
50
|
padding="0"
|
|
57
51
|
minHeight="100%"
|
|
52
|
+
extraStyles={`cursor: pointer;`}
|
|
58
53
|
dataQa={dataQa}
|
|
59
|
-
aria-disabled={disabled}
|
|
60
|
-
extraStyles={disabled ? "cursor: default;" : "cursor: pointer;"}
|
|
61
54
|
>
|
|
62
55
|
{children}
|
|
63
56
|
</Box>
|
|
@@ -72,26 +65,21 @@ const Placeholder = ({
|
|
|
72
65
|
variant,
|
|
73
66
|
largeIcon,
|
|
74
67
|
themeValues,
|
|
75
|
-
dataQa
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
borderRadius="4px"
|
|
91
|
-
border="none"
|
|
92
|
-
minHeight={themeValues.height}
|
|
93
|
-
hiddenStyles={!visible}
|
|
94
|
-
extraStyles={`
|
|
68
|
+
dataQa
|
|
69
|
+
}) => (
|
|
70
|
+
<PlaceholderContentWrapper
|
|
71
|
+
isLink={isLink}
|
|
72
|
+
action={action}
|
|
73
|
+
destination={destination}
|
|
74
|
+
dataQa={dataQa}
|
|
75
|
+
>
|
|
76
|
+
<Box
|
|
77
|
+
padding="0"
|
|
78
|
+
borderRadius="4px"
|
|
79
|
+
border="none"
|
|
80
|
+
minHeight={themeValues.height}
|
|
81
|
+
hiddenStyles={!visible}
|
|
82
|
+
extraStyles={`
|
|
95
83
|
background: linear-gradient(
|
|
96
84
|
to right,
|
|
97
85
|
${variant === "large" ? STORM_GREY : themeValues.color} 40%,
|
|
@@ -112,22 +100,22 @@ const Placeholder = ({
|
|
|
112
100
|
display: flex;
|
|
113
101
|
justify-content: center;
|
|
114
102
|
align-items:center;`}
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
103
|
+
hoverStyles={`background-color: ${
|
|
104
|
+
variant === "large" ? GRECIAN_GREY : tint(0.9, themeValues.color)
|
|
105
|
+
};`}
|
|
106
|
+
>
|
|
107
|
+
<Center maxWidth="300px">
|
|
108
|
+
<Box
|
|
109
|
+
padding="0"
|
|
110
|
+
tabIndex="0"
|
|
111
|
+
onKeyPress={e => e.key === "Enter" && action()}
|
|
112
|
+
>
|
|
113
|
+
<Cluster justify="center" align="center" minHeight="100%">
|
|
114
|
+
<Switcher maxChildren={2} childGap="0">
|
|
115
|
+
{variant === "large" && <div></div>}
|
|
116
|
+
<Box
|
|
117
|
+
padding="0"
|
|
118
|
+
extraStyles={`.fill {
|
|
131
119
|
fill: ${
|
|
132
120
|
variant === "large" ? CHARADE_GREY : themeValues.color
|
|
133
121
|
};
|
|
@@ -136,45 +124,44 @@ const Placeholder = ({
|
|
|
136
124
|
variant === "large" ? CHARADE_GREY : themeValues.color
|
|
137
125
|
};
|
|
138
126
|
}`}
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
};
|
|
127
|
+
>
|
|
128
|
+
{variant === "large" ? (
|
|
129
|
+
<Center intrinsic>
|
|
130
|
+
{getLargeIcon(largeIcon)}
|
|
131
|
+
<Text
|
|
132
|
+
variant="pS"
|
|
133
|
+
color={themeValues.color}
|
|
134
|
+
weight={FONT_WEIGHT_REGULAR}
|
|
135
|
+
extraStyles={`text-align: center;`}
|
|
136
|
+
>
|
|
137
|
+
{text}
|
|
138
|
+
</Text>
|
|
139
|
+
</Center>
|
|
140
|
+
) : (
|
|
141
|
+
<Cover singleChild minHeight="100%">
|
|
142
|
+
<Cluster justify="center" align="center">
|
|
143
|
+
<IconAdd />
|
|
144
|
+
<Center intrinsic>
|
|
145
|
+
<Text
|
|
146
|
+
variant="pS"
|
|
147
|
+
color={themeValues.color}
|
|
148
|
+
weight={FONT_WEIGHT_REGULAR}
|
|
149
|
+
extraStyles={`padding: 0 0 0 8px; text-align: center;`}
|
|
150
|
+
>
|
|
151
|
+
{text}
|
|
152
|
+
</Text>
|
|
153
|
+
</Center>
|
|
154
|
+
</Cluster>
|
|
155
|
+
</Cover>
|
|
156
|
+
)}
|
|
157
|
+
</Box>
|
|
158
|
+
</Switcher>
|
|
159
|
+
</Cluster>
|
|
160
|
+
</Box>
|
|
161
|
+
</Center>
|
|
162
|
+
</Box>
|
|
163
|
+
</PlaceholderContentWrapper>
|
|
164
|
+
);
|
|
178
165
|
|
|
179
166
|
export default themeComponent(
|
|
180
167
|
Placeholder,
|
|
@@ -7,7 +7,6 @@ import * as Styled from "./LinkCard.styled";
|
|
|
7
7
|
import { noop } from "../../../util/general";
|
|
8
8
|
|
|
9
9
|
const LinkCard = ({
|
|
10
|
-
variant = "primary", // "primary" | "disabled"
|
|
11
10
|
title = "Test Workflow",
|
|
12
11
|
subtitle = "Link your benefit plan",
|
|
13
12
|
showLeft,
|
|
@@ -40,7 +39,10 @@ const LinkCard = ({
|
|
|
40
39
|
hoverStyles={extraHoverStyles}
|
|
41
40
|
activeStyles={extraActiveStyles}
|
|
42
41
|
onClick={disabled ? noop : onClick}
|
|
43
|
-
disabled={disabled}
|
|
42
|
+
aria-disabled={disabled}
|
|
43
|
+
isDisabled={disabled}
|
|
44
|
+
role="group"
|
|
45
|
+
aria-label={`${title}, ${subtitle}`}
|
|
44
46
|
>
|
|
45
47
|
<Stack
|
|
46
48
|
childGap={0}
|
|
@@ -50,12 +52,21 @@ const LinkCard = ({
|
|
|
50
52
|
fullHeight
|
|
51
53
|
>
|
|
52
54
|
<Box padding={0} width="100%">
|
|
53
|
-
<Styled.Title
|
|
55
|
+
<Styled.Title
|
|
56
|
+
variant={titleVariant}
|
|
57
|
+
theme={themeValues}
|
|
58
|
+
margin={0}
|
|
59
|
+
isDisabled={disabled}
|
|
60
|
+
>
|
|
54
61
|
{title}
|
|
55
62
|
</Styled.Title>
|
|
56
63
|
</Box>
|
|
57
64
|
<Box padding={"0 0 40px"} width="100%">
|
|
58
|
-
<Styled.Subtitle
|
|
65
|
+
<Styled.Subtitle
|
|
66
|
+
variant="pS"
|
|
67
|
+
theme={themeValues}
|
|
68
|
+
isDisabled={disabled}
|
|
69
|
+
>
|
|
59
70
|
{subtitle}
|
|
60
71
|
</Styled.Subtitle>
|
|
61
72
|
</Box>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import page from "../../../../.storybook/page";
|
|
2
|
-
import { boolean,
|
|
2
|
+
import { boolean, text } from "@storybook/addon-knobs";
|
|
3
3
|
import React from "react";
|
|
4
4
|
import LinkCard from "./LinkCard";
|
|
5
5
|
import Box from "../../atoms/layouts/Box";
|
|
@@ -11,61 +11,65 @@ import AutopayIcon from "../../atoms/icons/AutopayIcon";
|
|
|
11
11
|
import {
|
|
12
12
|
CORNFLOWER_BLUE,
|
|
13
13
|
ROYAL_BLUE_VIVID,
|
|
14
|
+
LINK_WATER,
|
|
15
|
+
WHITE,
|
|
14
16
|
MANATEE_GREY,
|
|
17
|
+
GHOST_GREY,
|
|
15
18
|
TRANSPARENT
|
|
16
19
|
} from "../../../constants/colors";
|
|
17
20
|
|
|
21
|
+
const theme = {
|
|
22
|
+
disabledBackgroundColor: TRANSPARENT,
|
|
23
|
+
disabledBorderColor: GHOST_GREY,
|
|
24
|
+
disabledColor: MANATEE_GREY,
|
|
25
|
+
activeBackgroundColor: CORNFLOWER_BLUE,
|
|
26
|
+
backgroundColor: WHITE,
|
|
27
|
+
borderColor: LINK_WATER,
|
|
28
|
+
color: ROYAL_BLUE_VIVID
|
|
29
|
+
};
|
|
30
|
+
|
|
18
31
|
const groupId = "props";
|
|
19
|
-
const variant = "primary";
|
|
20
|
-
const variants = { primary: "primary", disabled: "disabled" };
|
|
21
32
|
const disabled = false;
|
|
22
33
|
const showLeft = true;
|
|
23
34
|
|
|
24
|
-
const renderLeftContent = ({ disabled }) => {
|
|
25
|
-
return (
|
|
26
|
-
<Box background="transparent" borderWidthOverride="0 0 0 0" padding="0">
|
|
27
|
-
<Badge
|
|
28
|
-
label="Autopay Available"
|
|
29
|
-
Icon={AutopayIcon}
|
|
30
|
-
variant={disabled ? "disabled" : "success"}
|
|
31
|
-
/>
|
|
32
|
-
</Box>
|
|
33
|
-
);
|
|
34
|
-
};
|
|
35
|
-
const renderRightContent = ({ disabled }) => {
|
|
36
|
-
return (
|
|
37
|
-
<Stack direction="row" childGap="6px">
|
|
38
|
-
<Text
|
|
39
|
-
variant="pS"
|
|
40
|
-
disabled={disabled || variant === "disabled"}
|
|
41
|
-
className="show-on-hover"
|
|
42
|
-
color={disabled ? MANATEE_GREY : ROYAL_BLUE_VIVID}
|
|
43
|
-
extraStyles={`text-align: right; color: transparent; ${
|
|
44
|
-
!showLeft ? "margin-left: auto;" : ""
|
|
45
|
-
}`}
|
|
46
|
-
>
|
|
47
|
-
Find
|
|
48
|
-
</Text>
|
|
49
|
-
<PlusCircleIcon color={disabled ? MANATEE_GREY : ROYAL_BLUE_VIVID} />
|
|
50
|
-
</Stack>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
53
35
|
export const linkCard = () => {
|
|
54
36
|
return (
|
|
55
37
|
<LinkCard
|
|
56
38
|
disabled={boolean("disabled", disabled, groupId)}
|
|
57
|
-
variant={select("variant", variants, variant, groupId)}
|
|
58
39
|
title={text("title", "Link Card Title", groupId)}
|
|
59
40
|
subtitle={text("subtitle", "Link card description", groupId)}
|
|
60
41
|
path={text("path", "/service/animal-care-and-control", groupId)}
|
|
42
|
+
themeValues={theme}
|
|
61
43
|
showLeft={boolean("showLeft", true, groupId)}
|
|
62
44
|
onClick={() => window.alert("Click event!")}
|
|
63
|
-
leftContent={
|
|
45
|
+
leftContent={
|
|
46
|
+
<Box background="transparent" borderWidthOverride="0 0 0 0" padding="0">
|
|
47
|
+
<Badge
|
|
48
|
+
label="Autopay Available"
|
|
49
|
+
Icon={AutopayIcon}
|
|
50
|
+
variant={disabled ? "disabled" : "success"}
|
|
51
|
+
/>
|
|
52
|
+
</Box>
|
|
53
|
+
}
|
|
64
54
|
showRight={boolean("showRight", true, groupId)}
|
|
65
|
-
rightContent={
|
|
55
|
+
rightContent={
|
|
56
|
+
<Stack direction="row" childGap="6px">
|
|
57
|
+
<Text
|
|
58
|
+
variant="pS"
|
|
59
|
+
className="show-on-hover"
|
|
60
|
+
color={ROYAL_BLUE_VIVID}
|
|
61
|
+
extraStyles={`text-align: right; color: transparent; ${
|
|
62
|
+
!showLeft ? "margin-left: auto;" : ""
|
|
63
|
+
}`}
|
|
64
|
+
>
|
|
65
|
+
Find
|
|
66
|
+
</Text>
|
|
67
|
+
<PlusCircleIcon color={ROYAL_BLUE_VIVID} />
|
|
68
|
+
</Stack>
|
|
69
|
+
}
|
|
66
70
|
extraHoverStyles={`
|
|
67
71
|
.show-on-hover {
|
|
68
|
-
color: ${
|
|
72
|
+
color: ${ROYAL_BLUE_VIVID};
|
|
69
73
|
}
|
|
70
74
|
`}
|
|
71
75
|
extraActiveStyles={`
|
|
@@ -4,7 +4,6 @@ import Paragraph from "../../atoms/paragraph";
|
|
|
4
4
|
import Stack from "../../atoms/layouts/Stack";
|
|
5
5
|
import { Box } from "../../atoms/layouts";
|
|
6
6
|
import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
|
|
7
|
-
import { TRANSPARENT, GHOST_GREY } from "../../../constants/colors";
|
|
8
7
|
|
|
9
8
|
export const Container = styled(Box)`
|
|
10
9
|
display: flex;
|
|
@@ -15,39 +14,47 @@ export const Container = styled(Box)`
|
|
|
15
14
|
flex-shrink: 0;
|
|
16
15
|
align-self: stretch;
|
|
17
16
|
border-radius: 8px;
|
|
18
|
-
${({ theme }) => `
|
|
19
|
-
background-color: ${
|
|
20
|
-
|
|
17
|
+
${({ isDisabled, theme }) => `
|
|
18
|
+
background-color: ${
|
|
19
|
+
isDisabled ? theme.disabledBackgroundColor : theme.backgroundColor
|
|
20
|
+
};
|
|
21
|
+
border: 1px solid ${
|
|
22
|
+
isDisabled ? theme.disabledBorderColor : theme.borderColor
|
|
23
|
+
};
|
|
21
24
|
`}
|
|
22
25
|
transition: all .2s ease-in-out;
|
|
23
26
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
27
|
+
${({ isDisabled, theme }) =>
|
|
28
|
+
isDisabled
|
|
29
|
+
? `
|
|
30
|
+
&:hover,
|
|
31
|
+
&:active {
|
|
32
|
+
cursor: default;
|
|
33
|
+
box-shadow: none;
|
|
34
|
+
border: 1px solid ${theme.disabledBorderColor};
|
|
35
|
+
}
|
|
36
|
+
`
|
|
37
|
+
: `
|
|
38
|
+
&:hover,
|
|
39
|
+
&:active {
|
|
40
|
+
cursor: pointer;
|
|
41
|
+
box-shadow: 0px 0px 0px 0px rgba(41, 42, 51, 0.1),
|
|
42
|
+
0px 5px 11px 0px rgba(41, 42, 51, 0.1),
|
|
43
|
+
0px 4px 19px 0px rgba(41, 42, 51, 0.09),
|
|
44
|
+
0px 27px 26px 0px rgba(41, 42, 51, 0.05),
|
|
45
|
+
0px 56px 31px 0px rgba(41, 42, 51, 0.01),
|
|
46
|
+
0px 80px 33px 0px rgba(41, 42, 51, 0);
|
|
47
|
+
}
|
|
40
48
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
49
|
+
&:hover:not(:active) {
|
|
50
|
+
border: 1px solid ${theme.borderColor};
|
|
51
|
+
}
|
|
44
52
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
53
|
+
&:active {
|
|
54
|
+
background-color: ${theme.activeBackgroundColor};
|
|
55
|
+
border: 1px solid ${theme.borderColor};
|
|
56
|
+
}
|
|
57
|
+
`}
|
|
51
58
|
`;
|
|
52
59
|
|
|
53
60
|
export const Title = styled(Heading)`
|
|
@@ -61,7 +68,8 @@ export const Title = styled(Heading)`
|
|
|
61
68
|
line-height: 150%;
|
|
62
69
|
background-color: transparent;
|
|
63
70
|
font-weight: ${FONT_WEIGHT_SEMIBOLD};
|
|
64
|
-
${({ theme }) =>
|
|
71
|
+
${({ isDisabled, theme }) =>
|
|
72
|
+
`color: ${isDisabled ? theme.disabledColor : theme.color};`};
|
|
65
73
|
`;
|
|
66
74
|
|
|
67
75
|
export const Subtitle = styled(Paragraph)`
|
|
@@ -72,10 +80,11 @@ export const Subtitle = styled(Paragraph)`
|
|
|
72
80
|
-webkit-line-clamp: 2;
|
|
73
81
|
align-self: stretch;
|
|
74
82
|
font-size: 14px;
|
|
75
|
-
line-height: 150
|
|
83
|
+
line-height: 150%;
|
|
76
84
|
letter-spacing: 0.14px;
|
|
77
85
|
font-weight: ${FONT_WEIGHT_SEMIBOLD};
|
|
78
|
-
${({ theme }) =>
|
|
86
|
+
${({ isDisabled, theme }) =>
|
|
87
|
+
`color: ${isDisabled ? theme.disabledColor : theme.color};`};
|
|
79
88
|
`;
|
|
80
89
|
|
|
81
90
|
export const Footer = styled(Stack)`
|
|
@@ -8,24 +8,32 @@ import {
|
|
|
8
8
|
TRANSPARENT
|
|
9
9
|
} from "../../../constants/colors";
|
|
10
10
|
|
|
11
|
+
const disabledBackgroundColor = {
|
|
12
|
+
primary: TRANSPARENT
|
|
13
|
+
};
|
|
14
|
+
const disabledBorderColor = {
|
|
15
|
+
primary: GHOST_GREY
|
|
16
|
+
};
|
|
17
|
+
const disabledColor = {
|
|
18
|
+
primary: MANATEE_GREY
|
|
19
|
+
};
|
|
11
20
|
const activeBackgroundColor = {
|
|
12
|
-
primary:
|
|
13
|
-
disabled: `${TRANSPARENT}`
|
|
21
|
+
primary: CORNFLOWER_BLUE
|
|
14
22
|
};
|
|
15
23
|
const backgroundColor = {
|
|
16
|
-
primary:
|
|
17
|
-
disabled: `${TRANSPARENT}`
|
|
24
|
+
primary: LINK_WATER
|
|
18
25
|
};
|
|
19
26
|
const borderColor = {
|
|
20
|
-
primary:
|
|
21
|
-
disabled: `${GHOST_GREY}`
|
|
27
|
+
primary: MOON_RAKER
|
|
22
28
|
};
|
|
23
29
|
const color = {
|
|
24
|
-
primary:
|
|
25
|
-
disabled: `${MANATEE_GREY}`
|
|
30
|
+
primary: ROYAL_BLUE_VIVID
|
|
26
31
|
};
|
|
27
32
|
|
|
28
33
|
export const fallbackValues = {
|
|
34
|
+
disabledBackgroundColor,
|
|
35
|
+
disabledBorderColor,
|
|
36
|
+
disabledColor,
|
|
29
37
|
activeBackgroundColor,
|
|
30
38
|
backgroundColor,
|
|
31
39
|
borderColor,
|
|
@@ -115,6 +115,7 @@ const Obligation = ({
|
|
|
115
115
|
description={description}
|
|
116
116
|
subDescription={subDescription}
|
|
117
117
|
allowedPaymentInstruments={allowedPaymentInstruments}
|
|
118
|
+
disableActions={isInCustomerManagement}
|
|
118
119
|
/>
|
|
119
120
|
)}
|
|
120
121
|
</Cluster>
|
|
@@ -138,7 +139,7 @@ const Obligation = ({
|
|
|
138
139
|
description={description}
|
|
139
140
|
subDescription={subDescription}
|
|
140
141
|
allowedPaymentInstruments={allowedPaymentInstruments}
|
|
141
|
-
|
|
142
|
+
disableActions={isInCustomerManagement}
|
|
142
143
|
/>
|
|
143
144
|
)}
|
|
144
145
|
</Stack>
|
|
@@ -162,7 +163,7 @@ const Obligation = ({
|
|
|
162
163
|
description={description}
|
|
163
164
|
subDescription={subDescription}
|
|
164
165
|
allowedPaymentInstruments={allowedPaymentInstruments}
|
|
165
|
-
|
|
166
|
+
disableActions={isInCustomerManagement}
|
|
166
167
|
/>
|
|
167
168
|
)}
|
|
168
169
|
</Box>
|
|
@@ -221,7 +222,7 @@ const Obligation = ({
|
|
|
221
222
|
description={description}
|
|
222
223
|
subDescription={subDescription}
|
|
223
224
|
allowedPaymentInstruments={allowedPaymentInstruments}
|
|
224
|
-
|
|
225
|
+
disableActions={isInCustomerManagement}
|
|
225
226
|
/>
|
|
226
227
|
)}
|
|
227
228
|
</Cluster>
|
|
@@ -244,7 +245,7 @@ const Obligation = ({
|
|
|
244
245
|
description={description}
|
|
245
246
|
subDescription={subDescription}
|
|
246
247
|
allowedPaymentInstruments={allowedPaymentInstruments}
|
|
247
|
-
|
|
248
|
+
disableActions={isInCustomerManagement}
|
|
248
249
|
/>
|
|
249
250
|
)}
|
|
250
251
|
</Stack>
|