@factorearth/component-library 4.0.1-alpha.0 → 4.0.3-alpha.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.
- package/dist/Atoms/Accordion/Accordion.d.ts +2 -2
- package/dist/Atoms/Accordion/Accordion.js +4 -3
- package/dist/Atoms/Accordion/Accordion.js.map +1 -1
- package/dist/Atoms/Typography/Typography.js +0 -1
- package/dist/Atoms/Typography/Typography.js.map +1 -1
- package/dist/Organisms/Tutorial/Tutorial.js +8 -9
- package/dist/Organisms/Tutorial/Tutorial.js.map +1 -1
- package/package.json +2 -2
|
@@ -2,9 +2,9 @@ import React from "react";
|
|
|
2
2
|
import { Colors } from "../../Theme/types";
|
|
3
3
|
interface Props {
|
|
4
4
|
color: Colors & string;
|
|
5
|
-
|
|
5
|
+
dropdownContent: DropdownContent;
|
|
6
6
|
}
|
|
7
|
-
type
|
|
7
|
+
type DropdownContent = {
|
|
8
8
|
title: string;
|
|
9
9
|
content: string[];
|
|
10
10
|
imgs?: {
|
|
@@ -6,6 +6,7 @@ const Container = styled.div `
|
|
|
6
6
|
background: ${({ expanded, color }) => expanded ? color.background.tertiary : color.background.primary};
|
|
7
7
|
padding: 8px;
|
|
8
8
|
border-top: ${({ color }) => `${color.background.secondary} 1px solid`};
|
|
9
|
+
cursor: pointer
|
|
9
10
|
`;
|
|
10
11
|
const Header = styled.div `
|
|
11
12
|
display: flex;
|
|
@@ -24,7 +25,7 @@ const Step = styled.div `
|
|
|
24
25
|
align-self: stretch;
|
|
25
26
|
`;
|
|
26
27
|
function Accordion(props) {
|
|
27
|
-
const { color,
|
|
28
|
+
const { color, dropdownContent } = props;
|
|
28
29
|
const [dropdownOpen, setDropdownOpen] = useState(false);
|
|
29
30
|
function toggleDropdown() {
|
|
30
31
|
setDropdownOpen(!dropdownOpen);
|
|
@@ -32,8 +33,8 @@ function Accordion(props) {
|
|
|
32
33
|
return (React.createElement(Container, { color: color, expanded: dropdownOpen },
|
|
33
34
|
React.createElement(Header, { onClick: toggleDropdown },
|
|
34
35
|
dropdownOpen ? React.createElement(FiChevronUp, null) : React.createElement(FiChevronDown, null),
|
|
35
|
-
React.createElement(Typography, { textColor: color.text.primary, content:
|
|
36
|
-
dropdownOpen && (React.createElement(ContentContainer, { color: color },
|
|
36
|
+
React.createElement(Typography, { textColor: color.text.primary, content: dropdownContent.title, variant: "Paragraphy Body" })),
|
|
37
|
+
dropdownOpen && (React.createElement(ContentContainer, { color: color }, dropdownContent.content.map(content => React.createElement(Step, { color: color },
|
|
37
38
|
React.createElement(Typography, { textColor: color.text.primary, content: content, variant: "Paragraphy Body" })))))));
|
|
38
39
|
}
|
|
39
40
|
export default Accordion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../lib/Atoms/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAErD,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAAsC;eACnD,CAAC,EAAC,QAAQ,EAAE,KAAK,EAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO;;eAEtF,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,YAAY
|
|
1
|
+
{"version":3,"file":"Accordion.js","sourceRoot":"","sources":["../../../lib/Atoms/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,EAAE,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EAAE,OAAO,EAAE,iBAAiB,GAAI,CACjG;QACR,YAAY,IAAI,CAChB,oBAAC,gBAAgB,IAAC,KAAK,EAAE,KAAK,IAC7B,eAAe,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK;YACzD,oBAAC,UAAU,IAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,GAAI,CACrF,CAAC,CACW,CACnB,CACU,CACZ,CAAC;AACH,CAAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import styled from "@emotion/styled";
|
|
2
2
|
import React from "react";
|
|
3
3
|
import tokens from '../../Theme/tokens.json';
|
|
4
|
-
// const text = tokens.global.Typography;
|
|
5
4
|
const StyledText = styled.div `
|
|
6
5
|
color: ${({ textColor }) => textColor};
|
|
7
6
|
font-size: ${({ text }) => text.fontSize};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../lib/Atoms/Typography/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,yBAAyB,CAAA;AAmB5C,
|
|
1
|
+
{"version":3,"file":"Typography.js","sourceRoot":"","sources":["../../../lib/Atoms/Typography/Typography.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,yBAAyB,CAAA;AAmB5C,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAA+C;UAClE,CAAC,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,SAAS;cACxB,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ;iBACxB,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU;iBAC7B,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,UAAU;CAC7C,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAsB,EAAE,EAAE;IACpD,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,SAAS,EAAE,GAAG,KAAK,CAAC;IAE5D,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,KAAyB,CAAC;IAEzE,OAAO,CACN,oBAAC,UAAU,OAAK,SAAS,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,IAAI,gBAAc,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,IAClJ,OAAO,CACI,CACb,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -5,16 +5,17 @@ import Accordion from "../../Atoms/Accordion/Accordion";
|
|
|
5
5
|
import { Button } from "../../Atoms/Buttons/Button";
|
|
6
6
|
import { Typography } from "../../Atoms/Typography/Typography";
|
|
7
7
|
const TutorialOverlay = styled.div `
|
|
8
|
-
background-color: ${({ color }) => color.background.secondary};
|
|
9
|
-
// opacity: 0.8;
|
|
8
|
+
background-color: ${({ color }) => `${color.background.secondary}90`};
|
|
10
9
|
position: absolute;
|
|
11
10
|
z-index: 1000;
|
|
12
11
|
display: flex;
|
|
13
12
|
justify-content: center;
|
|
14
|
-
|
|
15
|
-
height: 100vw;
|
|
13
|
+
height: 100vh;
|
|
16
14
|
width: 100vw;
|
|
15
|
+
top: 0;
|
|
16
|
+
left: 0;
|
|
17
17
|
`;
|
|
18
|
+
//I used the calc below because align-items: center had no affect when applied to the styled div above
|
|
18
19
|
const TutorialWrapper = styled.div `
|
|
19
20
|
background-color: ${({ color }) => color.background.primary};
|
|
20
21
|
color: ${({ color }) => color.text.primary};
|
|
@@ -31,6 +32,7 @@ const TutorialWrapper = styled.div `
|
|
|
31
32
|
&::-webkit-scrollbar {
|
|
32
33
|
display: none;
|
|
33
34
|
}
|
|
35
|
+
margin-top: calc(50vh - 250px)
|
|
34
36
|
`;
|
|
35
37
|
const HelpHeader = styled.div `
|
|
36
38
|
display: flex;
|
|
@@ -72,15 +74,12 @@ export const Tutorial = (props) => {
|
|
|
72
74
|
React.createElement(Typography, { textColor: color.text.primary, content: page["page-summary"], variant: "Paragraphy Body" })),
|
|
73
75
|
React.createElement(ContentContainer, { color: color },
|
|
74
76
|
React.createElement(Typography, { textColor: color.text.primary, content: "Common User Flows", variant: "Heading 4", style: { paddingBottom: "8px" } }),
|
|
75
|
-
page["user-flows"].map((flow) => React.createElement(Accordion, { color: color,
|
|
77
|
+
page["user-flows"].map((flow) => React.createElement(Accordion, { color: color, dropdownContent: flow })),
|
|
76
78
|
React.createElement(Typography, { textColor: color.text.primary, content: "Page Features", variant: "Heading 4", style: { paddingBottom: "8px" } }),
|
|
77
|
-
page.features.map((feature) => React.createElement(Accordion, { color: color,
|
|
79
|
+
page.features.map((feature) => React.createElement(Accordion, { color: color, dropdownContent: feature }))),
|
|
78
80
|
React.createElement(ContactContainer, { color: color },
|
|
79
81
|
React.createElement(Typography, { textColor: color.text.primary, content: "Please ask further questions, or reach out for additional support by emailing", variant: "Label" }),
|
|
80
82
|
React.createElement(Typography, { textColor: color.text.primary, content: "devs@factorearth.com", variant: "Heading 4" }),
|
|
81
83
|
React.createElement(Button, { colorPalette: color, variant: "filled" }, "Report Bug")))));
|
|
82
84
|
};
|
|
83
|
-
//needs to take in content from the json like the drawer in record
|
|
84
|
-
//use the styles from the modal container I think
|
|
85
|
-
//drop downs are similar to the exsiting ones in Record but some styling changes need to happen, plus icons are added
|
|
86
85
|
//# sourceMappingURL=Tutorial.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tutorial.js","sourceRoot":"","sources":["../../../lib/Organisms/Tutorial/Tutorial.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,SAAS,MAAM,iCAAiC,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAE9D,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAoB;qBACjC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,SAAS;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Tutorial.js","sourceRoot":"","sources":["../../../lib/Organisms/Tutorial/Tutorial.tsx"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AACrC,OAAO,SAAS,MAAM,iCAAiC,CAAA;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAA;AAE9D,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAoB;qBACjC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,IAAI;;;;;;;;;CASpE,CAAC;AAEF,sGAAsG;AACtG,MAAM,eAAe,GAAG,MAAM,CAAC,GAAG,CAAoB;sBAChC,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,OAAO;WAClD,CAAC,EAAE,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AI,CAAC,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,WAAW,GAAI;gBAEpG,oBAAC,MAAM,IAAC,YAAY,EAAE,KAAK,EAAE,OAAO,EAAC,QAAQ,iBAAoB,CAEhD,CACH,CACF,CACnB,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factorearth/component-library",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.3-alpha.0",
|
|
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",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"access": "public",
|
|
47
47
|
"registry": "https://registry.npmjs.org/"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "22623110d0dc150a8b86af5707dc9dbfaab5cc6d",
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@emotion/react": "^11.13.0",
|
|
52
52
|
"@emotion/styled": "^11.13.0",
|