@factorearth/component-library 6.6.2 → 6.6.5
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/Atoms/TextField/TextField.js +1 -1
- package/dist/Atoms/TextField/TextField.js.map +1 -1
- package/dist/Organisms/ErrorSplash/ErrorSplash.d.ts +3 -5
- package/dist/Organisms/ErrorSplash/ErrorSplash.js +18 -7
- package/dist/Organisms/ErrorSplash/ErrorSplash.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useEffect, useRef, useState } from "react";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
|
+
// Styled component for the regular text input field.
|
|
3
4
|
const InputWrapper = styled.input `
|
|
4
5
|
width: 100%;
|
|
5
6
|
min-width: 60px;
|
|
@@ -16,7 +17,6 @@ const InputWrapper = styled.input `
|
|
|
16
17
|
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
17
18
|
padding: 0;
|
|
18
19
|
padding-left: 16px;
|
|
19
|
-
${({ moreHorizon }) => moreHorizon && `border-right: none;`}
|
|
20
20
|
height: 38px;
|
|
21
21
|
::placeholder {
|
|
22
22
|
font-weight: 500;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextField.js","sourceRoot":"","sources":["../../../lib/Atoms/TextField/TextField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AAErC,MAAM,YAAY,GAAG,MAAM,CAAC,KAAK,CAG/B;;;;;;;GAOC,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,CACf,WAAW;IACX,+DAA+D;qBAClD,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO;iBACzD,CAAC,EAAE,YAAY,EAAE,EAAE,EAA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AE;QACX,MAAM,KAAK,GAAG,GAAG,CAAC,OAAO,CAAC;QAC1B,IAAI,aAAa,IAAI,MAAM,EAAE,CAAC;YAC1B,IAAI,KAAK,IAAI,MAAM,EAAE,CAAC;gBAClB,KAAK,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;YAC5C,CAAC;QACL,CAAC;IACL,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,CAAC,CAAC,CAAC;IAEnC,MAAM,YAAY,GAAG,CAAC,CAAsC,EAAE,EAAE;QAC5D,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QACnC,IAAI,QAAQ;YAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;IAC9B,CAAC,CAAC;IAEF,OAAO,CACH,6BAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;QAC1C,oBAAC,YAAY,OACL,SAAS,EACb,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,EACR,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,EACvC,YAAY,EAAE,YAAY,GAC5B;QACD,WAAW,IAAI,WAAW,CACzB,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,12 +2,10 @@ import React from "react";
|
|
|
2
2
|
import { Colors } from "Theme/types";
|
|
3
3
|
interface ErrorSplashProps {
|
|
4
4
|
colorPalette: Colors & string;
|
|
5
|
-
title: string;
|
|
6
|
-
description: string;
|
|
7
|
-
image?: string;
|
|
8
5
|
backgroundImage: string;
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
onFAQ?: () => void;
|
|
7
|
+
onTryAgain?: () => void;
|
|
8
|
+
onReportBug?: () => void;
|
|
11
9
|
}
|
|
12
10
|
export declare const ErrorSplash: (props: ErrorSplashProps) => React.JSX.Element;
|
|
13
11
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import styled from "@emotion/styled";
|
|
3
|
-
import { FiRefreshCw } from "react-icons/fi";
|
|
3
|
+
import { FiRefreshCw, FiHelpCircle } from "react-icons/fi";
|
|
4
4
|
import { Button } from "../../Atoms/Buttons/Button";
|
|
5
|
+
import { ReportABugButton } from "../../Atoms/Buttons/ReportABugButton";
|
|
5
6
|
import { Typography } from "../../Atoms/Typography/Typography";
|
|
6
7
|
const ErrorSplashContainer = styled.div `
|
|
7
8
|
background-color: ${({ colorPalette }) => colorPalette.background.primary};
|
|
@@ -26,6 +27,14 @@ const DescriptionDiv = styled.div `
|
|
|
26
27
|
margin-top: 24px;
|
|
27
28
|
text-align: center;
|
|
28
29
|
`;
|
|
30
|
+
const ActionsDiv = styled.div `
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: row;
|
|
33
|
+
flex-wrap: wrap;
|
|
34
|
+
justify-content: center;
|
|
35
|
+
gap: 12px;
|
|
36
|
+
margin-top: 16px;
|
|
37
|
+
`;
|
|
29
38
|
const BackgroundDiv = styled.div `
|
|
30
39
|
display: flex;
|
|
31
40
|
height: 245px;
|
|
@@ -64,15 +73,17 @@ const ContactContainer = styled.div `
|
|
|
64
73
|
align-self: stretch;
|
|
65
74
|
`;
|
|
66
75
|
export const ErrorSplash = (props) => {
|
|
67
|
-
const { colorPalette,
|
|
76
|
+
const { colorPalette, backgroundImage, onFAQ, onTryAgain, onReportBug, ...tableHtmlProps } = props;
|
|
68
77
|
return (React.createElement(ErrorSplashContainer, { colorPalette: colorPalette, ...tableHtmlProps },
|
|
69
78
|
React.createElement(HeaderDiv, { colorPalette: colorPalette },
|
|
70
|
-
React.createElement(Typography, { textColor: colorPalette.text.primary, content:
|
|
79
|
+
React.createElement(Typography, { textColor: colorPalette.text.primary, content: "Oops something went wrong!", variant: "Heading 3" }),
|
|
71
80
|
React.createElement(DescriptionDiv, { colorPalette: colorPalette },
|
|
72
|
-
React.createElement(Typography, { textColor: colorPalette.text.primary, content:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
81
|
+
React.createElement(Typography, { textColor: colorPalette.text.primary, content: "An unexpected error occurred. You can try again, or report the issue if it persists.", variant: "Paragraphy Body" }),
|
|
82
|
+
(onFAQ || onTryAgain || onReportBug) && (React.createElement(ActionsDiv, null,
|
|
83
|
+
onFAQ && React.createElement(Button, { colorPalette: colorPalette, onClick: onFAQ, label: "FAQ", variant: "outlined", icon: React.createElement(FiHelpCircle, null) }),
|
|
84
|
+
onTryAgain && React.createElement(Button, { colorPalette: colorPalette, onClick: onTryAgain, label: "Try Again", variant: "outlined", icon: React.createElement(FiRefreshCw, null) }),
|
|
85
|
+
onReportBug && React.createElement(ReportABugButton, { colorPalette: colorPalette, variant: "outlined", onClick: onReportBug }))))),
|
|
86
|
+
React.createElement(BackgroundDiv, { colorPalette: colorPalette, backgroundImage: backgroundImage }),
|
|
76
87
|
React.createElement(ContactContainer, { colors: colorPalette },
|
|
77
88
|
React.createElement(Typography, { textColor: colorPalette.text.primary, content: "Please ask further questions, or reach out for additional support by emailing", variant: "Label" }),
|
|
78
89
|
React.createElement(Typography, { textColor: colorPalette.text.primary, content: "devs@factorearth.com", variant: "Heading 4" }))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorSplash.js","sourceRoot":"","sources":["../../../lib/Organisms/ErrorSplash/ErrorSplash.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"ErrorSplash.js","sourceRoot":"","sources":["../../../lib/Organisms/ErrorSplash/ErrorSplash.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,W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AAC,gBAAgB,IAAC,MAAM,EAAE,YAAY;YACrC,oBAAC,UAAU,IAAC,SAAS,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,+EAA+E,EAAE,OAAO,EAAE,OAAO,GAAI;YAChK,oBAAC,UAAU,IAAC,SAAS,EAAE,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,WAAW,GAAI,CACzF,CACG,CACvB,CAAC;AACH,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factorearth/component-library",
|
|
3
|
-
"version": "6.6.
|
|
3
|
+
"version": "6.6.5",
|
|
4
4
|
"description": " A storybook component library for FactorEarth",
|
|
5
5
|
"author": "madtrx <marlin.makori@gmail.com>",
|
|
6
6
|
"homepage": "https://github.com/FactorEarth/RecordMiddleware#readme",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"access": "public",
|
|
48
48
|
"registry": "https://registry.npmjs.org/"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "5724b3887edf04166eede68965af21607e0ef8ef",
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@emotion/react": "^11.13.0",
|
|
53
53
|
"@emotion/styled": "^11.13.0",
|