@thecb/components 3.5.0 → 3.5.1
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
CHANGED
|
@@ -13633,8 +13633,8 @@ var IconAdd = function IconAdd() {
|
|
|
13633
13633
|
var TimeoutImage = function TimeoutImage() {
|
|
13634
13634
|
return /*#__PURE__*/React__default.createElement("svg", {
|
|
13635
13635
|
xmlns: "http://www.w3.org/2000/svg",
|
|
13636
|
-
width: "
|
|
13637
|
-
height: "
|
|
13636
|
+
width: "100%",
|
|
13637
|
+
height: "100%",
|
|
13638
13638
|
viewBox: "0 0 458 308"
|
|
13639
13639
|
}, /*#__PURE__*/React__default.createElement("g", {
|
|
13640
13640
|
fill: "none",
|
|
@@ -37811,16 +37811,20 @@ var TermsAndConditions = function TermsAndConditions(_ref) {
|
|
|
37811
37811
|
|
|
37812
37812
|
var Timeout = function Timeout(_ref) {
|
|
37813
37813
|
var onLogout = _ref.onLogout;
|
|
37814
|
+
|
|
37815
|
+
var _useContext = React.useContext(styled.ThemeContext),
|
|
37816
|
+
isMobile = _useContext.isMobile;
|
|
37817
|
+
|
|
37814
37818
|
return /*#__PURE__*/React__default.createElement(Cover, null, /*#__PURE__*/React__default.createElement(Center, {
|
|
37815
37819
|
intrinsic: true
|
|
37816
37820
|
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
37817
37821
|
padding: "0",
|
|
37818
|
-
maxWidth: "500px"
|
|
37822
|
+
maxWidth: isMobile ? "100%" : "500px"
|
|
37819
37823
|
}, /*#__PURE__*/React__default.createElement(Stack, {
|
|
37820
37824
|
childGap: "32px",
|
|
37821
37825
|
justify: "center"
|
|
37822
|
-
}, /*#__PURE__*/React__default.createElement(
|
|
37823
|
-
|
|
37826
|
+
}, /*#__PURE__*/React__default.createElement(Box, {
|
|
37827
|
+
padding: isMobile ? "1rem" : "0"
|
|
37824
37828
|
}, /*#__PURE__*/React__default.createElement(TimeoutImage, null)), /*#__PURE__*/React__default.createElement(Box, {
|
|
37825
37829
|
padding: "0"
|
|
37826
37830
|
}, /*#__PURE__*/React__default.createElement(Heading$1, {
|
|
@@ -37840,6 +37844,8 @@ var Timeout = function Timeout(_ref) {
|
|
|
37840
37844
|
})))))));
|
|
37841
37845
|
};
|
|
37842
37846
|
|
|
37847
|
+
var Timeout$1 = withWindowSize(Timeout);
|
|
37848
|
+
|
|
37843
37849
|
var WorkflowTile = function WorkflowTile(_ref) {
|
|
37844
37850
|
var _ref$workflowName = _ref.workflowName,
|
|
37845
37851
|
workflowName = _ref$workflowName === void 0 ? "Test Workflow" : _ref$workflowName,
|
|
@@ -38261,7 +38267,7 @@ exports.TableListItem = TableListItem;
|
|
|
38261
38267
|
exports.TermsAndConditions = TermsAndConditions;
|
|
38262
38268
|
exports.TermsAndConditionsModal = TermsAndConditionsModal$1;
|
|
38263
38269
|
exports.Text = Text$1;
|
|
38264
|
-
exports.Timeout = Timeout;
|
|
38270
|
+
exports.Timeout = Timeout$1;
|
|
38265
38271
|
exports.TimeoutImage = TimeoutImage;
|
|
38266
38272
|
exports.ToggleSwitch = ToggleSwitch$1;
|
|
38267
38273
|
exports.VerifiedEmailIcon = VerifiedEmailIcon$1;
|
package/package.json
CHANGED
|
@@ -1,41 +1,46 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useContext } from "react";
|
|
2
|
+
import { ThemeContext } from "styled-components";
|
|
2
3
|
import { Box, Stack, Center, Cover } from "../../atoms/layouts";
|
|
3
4
|
import { TimeoutImage } from "../../atoms/icons";
|
|
4
5
|
import ButtonWithAction from "../../atoms/button-with-action";
|
|
5
6
|
import Heading from "../../atoms/heading";
|
|
6
7
|
import { FONT_WEIGHT_BOLD } from "../../../constants/style_constants";
|
|
7
8
|
import Paragraph from "../../atoms/paragraph";
|
|
9
|
+
import withWindowSize from "../../withWindowSize";
|
|
8
10
|
|
|
9
|
-
const Timeout = ({ onLogout }) =>
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
Request Timed Out
|
|
20
|
-
</Heading>
|
|
21
|
-
<Paragraph variant="pL" extraStyles={`text-align: center;`}>
|
|
22
|
-
That was taking longer than we expected and your request timed
|
|
23
|
-
out. Please log out, log back in, and then try again.
|
|
24
|
-
</Paragraph>
|
|
25
|
-
</Box>
|
|
26
|
-
<Center intrinsic>
|
|
11
|
+
const Timeout = ({ onLogout }) => {
|
|
12
|
+
const { isMobile } = useContext(ThemeContext);
|
|
13
|
+
return (
|
|
14
|
+
<Cover>
|
|
15
|
+
<Center intrinsic>
|
|
16
|
+
<Box padding="0" maxWidth={isMobile ? "100%" : "500px"}>
|
|
17
|
+
<Stack childGap="32px" justify="center">
|
|
18
|
+
<Box padding={isMobile ? "1rem" : "0"}>
|
|
19
|
+
<TimeoutImage />
|
|
20
|
+
</Box>
|
|
27
21
|
<Box padding="0">
|
|
28
|
-
<
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
22
|
+
<Heading textAlign="center" weight={FONT_WEIGHT_BOLD}>
|
|
23
|
+
Request Timed Out
|
|
24
|
+
</Heading>
|
|
25
|
+
<Paragraph variant="pL" extraStyles={`text-align: center;`}>
|
|
26
|
+
That was taking longer than we expected and your request timed
|
|
27
|
+
out. Please log out, log back in, and then try again.
|
|
28
|
+
</Paragraph>
|
|
33
29
|
</Box>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
30
|
+
<Center intrinsic>
|
|
31
|
+
<Box padding="0">
|
|
32
|
+
<ButtonWithAction
|
|
33
|
+
variant="primary"
|
|
34
|
+
text="Log out"
|
|
35
|
+
action={onLogout}
|
|
36
|
+
/>
|
|
37
|
+
</Box>
|
|
38
|
+
</Center>
|
|
39
|
+
</Stack>
|
|
40
|
+
</Box>
|
|
41
|
+
</Center>
|
|
42
|
+
</Cover>
|
|
43
|
+
);
|
|
44
|
+
};
|
|
40
45
|
|
|
41
|
-
export default Timeout;
|
|
46
|
+
export default withWindowSize(Timeout);
|