@factorearth/component-library 4.0.2-alpha.0 → 4.0.4-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.d.ts +1 -0
- package/dist/Organisms/Tutorial/Tutorial.js +5 -6
- 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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AO,EAAE,OAAO,EAAE,eAAe,CAAC,KAAK,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"}
|
|
@@ -21,6 +21,7 @@ interface TutorialModalProps extends React.DetailedHTMLProps<React.HTMLAttribute
|
|
|
21
21
|
color: Colors & string;
|
|
22
22
|
setOpen: (open: boolean) => void;
|
|
23
23
|
page: Page;
|
|
24
|
+
reportBugOnClick: () => void;
|
|
24
25
|
}
|
|
25
26
|
export declare const Tutorial: (props: TutorialModalProps) => React.JSX.Element;
|
|
26
27
|
export {};
|
|
@@ -14,9 +14,8 @@ const TutorialOverlay = styled.div `
|
|
|
14
14
|
width: 100vw;
|
|
15
15
|
top: 0;
|
|
16
16
|
left: 0;
|
|
17
|
-
border: solid 2px pink;
|
|
18
17
|
`;
|
|
19
|
-
//I used the calc below
|
|
18
|
+
//I used the calc below because align-items: center had no affect when applied to the styled div above
|
|
20
19
|
const TutorialWrapper = styled.div `
|
|
21
20
|
background-color: ${({ color }) => color.background.primary};
|
|
22
21
|
color: ${({ color }) => color.text.primary};
|
|
@@ -65,7 +64,7 @@ const ContactContainer = styled.div `
|
|
|
65
64
|
align-self: stretch;
|
|
66
65
|
`;
|
|
67
66
|
export const Tutorial = (props) => {
|
|
68
|
-
const { children, color, page, setOpen, ...htmlProps } = props;
|
|
67
|
+
const { children, color, page, setOpen, reportBugOnClick, ...htmlProps } = props;
|
|
69
68
|
return (React.createElement(TutorialOverlay, { color: color, onClick: () => setOpen(false) },
|
|
70
69
|
React.createElement(TutorialWrapper, { color: color, ...htmlProps },
|
|
71
70
|
React.createElement(HelpHeader, { color: color },
|
|
@@ -75,12 +74,12 @@ export const Tutorial = (props) => {
|
|
|
75
74
|
React.createElement(Typography, { textColor: color.text.primary, content: page["page-summary"], variant: "Paragraphy Body" })),
|
|
76
75
|
React.createElement(ContentContainer, { color: color },
|
|
77
76
|
React.createElement(Typography, { textColor: color.text.primary, content: "Common User Flows", variant: "Heading 4", style: { paddingBottom: "8px" } }),
|
|
78
|
-
page["user-flows"].map((flow) => React.createElement(Accordion, { color: color,
|
|
77
|
+
page["user-flows"].map((flow) => React.createElement(Accordion, { color: color, dropdownContent: flow })),
|
|
79
78
|
React.createElement(Typography, { textColor: color.text.primary, content: "Page Features", variant: "Heading 4", style: { paddingBottom: "8px" } }),
|
|
80
|
-
page.features.map((feature) => React.createElement(Accordion, { color: color,
|
|
79
|
+
page.features.map((feature) => React.createElement(Accordion, { color: color, dropdownContent: feature }))),
|
|
81
80
|
React.createElement(ContactContainer, { color: color },
|
|
82
81
|
React.createElement(Typography, { textColor: color.text.primary, content: "Please ask further questions, or reach out for additional support by emailing", variant: "Label" }),
|
|
83
82
|
React.createElement(Typography, { textColor: color.text.primary, content: "devs@factorearth.com", variant: "Heading 4" }),
|
|
84
|
-
React.createElement(Button, { colorPalette: color,
|
|
83
|
+
React.createElement(Button, { colorPalette: color, onClick: reportBugOnClick, label: "Report a Bug", variant: "filled" })))));
|
|
85
84
|
};
|
|
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,GAAG,KAAK,CAAC,UAAU,CAAC,SAAS,IAAI
|
|
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,CAA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AAO,GAAI;gBACzJ,oBAAC,UAAU,IAAC,SAAS,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,EAAE,sBAAsB,EAAE,OAAO,EAAE,WAAW,GAAI;gBACpG,oBAAC,MAAM,IAAC,YAAY,EAAE,KAAK,EAAE,OAAO,EAAE,gBAAgB,EAAE,KAAK,EAAC,cAAc,EAAC,OAAO,EAAC,QAAQ,GAAG,CAC/E,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.4-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": "c5263faf495df4c3eac01b5b0134b9549dfc21f5",
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@emotion/react": "^11.13.0",
|
|
52
52
|
"@emotion/styled": "^11.13.0",
|