@factorearth/component-library 5.2.4-alpha.0 → 5.3.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.
Files changed (46) hide show
  1. package/README.md +11 -11
  2. package/dist/Atoms/Accordion/Accordion.js +18 -18
  3. package/dist/Atoms/Badge/Badge.js +18 -18
  4. package/dist/Atoms/Box/Box.js +15 -15
  5. package/dist/Atoms/Buttons/Button.js +23 -23
  6. package/dist/Atoms/ContentDropdown/ContentDropdown.js +24 -24
  7. package/dist/Atoms/DateField/DateField.js +94 -94
  8. package/dist/Atoms/FieldWrapper/FieldWrapper.js +35 -35
  9. package/dist/Atoms/MoreHorizonButton/MoreHorizonButton.js +52 -52
  10. package/dist/Atoms/NoteField/NoteField.js +38 -38
  11. package/dist/Atoms/NumberField/NumberField.js +63 -63
  12. package/dist/Atoms/OptionsDropdown/OptionsDropdown.js +38 -38
  13. package/dist/Atoms/Pagination/Pagination.js +25 -25
  14. package/dist/Atoms/PhoneNumberField/PhoneNumberField.js +4 -4
  15. package/dist/Atoms/ProgressBar/ProgressBar.js +16 -16
  16. package/dist/Atoms/SortDropdown/SortDropdown.js +39 -39
  17. package/dist/Atoms/Tab/Tab.js +18 -18
  18. package/dist/Atoms/TextField/TextField.js +24 -24
  19. package/dist/Atoms/Toggle/Toggle.js +11 -11
  20. package/dist/Atoms/Typography/Typography.js +7 -7
  21. package/dist/Molecules/Form/Form.js +8 -8
  22. package/dist/Molecules/NavMenu/NavMenu.js +102 -102
  23. package/dist/Molecules/TableHeader/TableHeader.js +14 -14
  24. package/dist/Molecules/TableRow/TableRow.js +27 -27
  25. package/dist/Molecules/Thumbnail/Thumbnail.d.ts +4 -4
  26. package/dist/Molecules/Thumbnail/Thumbnail.js +50 -126
  27. package/dist/Molecules/Thumbnail/Thumbnail.js.map +1 -1
  28. package/dist/Organisms/Card/Card.js +33 -33
  29. package/dist/Organisms/EditUserPerms/EditUserPerms.js +67 -67
  30. package/dist/Organisms/ErrorSplash/ErrorSplash.js +44 -44
  31. package/dist/Organisms/Modal/Modal.d.ts +5 -0
  32. package/dist/Organisms/Modal/Modal.js +88 -74
  33. package/dist/Organisms/Modal/Modal.js.map +1 -1
  34. package/dist/Organisms/Splash/Splash.d.ts +10 -0
  35. package/dist/Organisms/Splash/Splash.js +82 -0
  36. package/dist/Organisms/Splash/Splash.js.map +1 -0
  37. package/dist/Organisms/TabManager/TabManager.js +13 -13
  38. package/dist/Organisms/Table/Table.js +14 -14
  39. package/dist/Organisms/Tutorial/Tutorial.js +51 -51
  40. package/dist/index.d.ts +0 -1
  41. package/dist/index.js +0 -1
  42. package/dist/index.js.map +1 -1
  43. package/package.json +2 -2
  44. package/dist/Atoms/Spinner/Spinner.d.ts +0 -7
  45. package/dist/Atoms/Spinner/Spinner.js +0 -10
  46. package/dist/Atoms/Spinner/Spinner.js.map +0 -1
@@ -1,41 +1,41 @@
1
1
  import React, { forwardRef } from "react";
2
2
  import styled from "@emotion/styled";
3
- const CardContainer = styled.div `
4
- padding: 24px;
5
- border-width: 0.5px;
6
- border-style: solid;
7
- border-color: ${({ colorPalette }) => colorPalette.border.primary};
8
- border-right: none;
9
- border-left: none;
3
+ const CardContainer = styled.div `
4
+ padding: 24px;
5
+ border-width: 0.5px;
6
+ border-style: solid;
7
+ border-color: ${({ colorPalette }) => colorPalette.border.primary};
8
+ border-right: none;
9
+ border-left: none;
10
10
  `;
11
- const FieldsXThumbnailSection = styled.section `
12
- display: flex;
13
- justify-content: space-between;
14
- flex-direction: row-reverse;
15
- @media (max-width: 600px) {
16
- flex-direction: column;
17
- align-items: flex-end;
18
- }
19
-
20
- :has(div > div > button[aria-label="show-image"]) {
21
- flex-direction: column;
22
- }
11
+ const FieldsXThumbnailSection = styled.section `
12
+ display: flex;
13
+ justify-content: space-between;
14
+ flex-direction: row-reverse;
15
+ @media (max-width: 600px) {
16
+ flex-direction: column;
17
+ align-items: flex-end;
18
+ }
19
+
20
+ :has(div > div > button[aria-label="show-image"]) {
21
+ flex-direction: column;
22
+ }
23
23
  `;
24
- const ThumbnailSectionFields = styled.section `
25
- padding: 16px 24px 0px 0px;
26
- display: flex;
27
- flex-direction: column;
28
- justify-content: center;
29
- width: 100%;
30
- @media (max-width: 600px) {
31
- padding: 16px 0px 0px 24px;
32
- }
24
+ const ThumbnailSectionFields = styled.section `
25
+ padding: 16px 24px 0px 0px;
26
+ display: flex;
27
+ flex-direction: column;
28
+ justify-content: center;
29
+ width: 100%;
30
+ @media (max-width: 600px) {
31
+ padding: 16px 0px 0px 24px;
32
+ }
33
33
  `;
34
- const ButtonContainer = styled.div `
35
- display: flex;
36
- justify-content: flex-end;
37
- gap: 24px;
38
- padding-top: 24px;
34
+ const ButtonContainer = styled.div `
35
+ display: flex;
36
+ justify-content: flex-end;
37
+ gap: 24px;
38
+ padding-top: 24px;
39
39
  `;
40
40
  export const Card = forwardRef((props, ref) => {
41
41
  const { colorPalette, thumbnail, thumbnailSectionFields, remainingFields, buttons, } = props;
@@ -6,82 +6,82 @@ import Badge from "../../Atoms/Badge/Badge";
6
6
  import { DropdownSelect } from "../../Atoms/DropdownField/DropdownField";
7
7
  import { FieldWrapper } from "../../Atoms/FieldWrapper/FieldWrapper";
8
8
  import { TextFieldWrapper } from "../../Atoms/TextField/TextField";
9
- const Container = styled.div `
10
- display: flex;
11
- padding: 16px 24px;
12
- flex-direction: column;
13
- align-items: flex-start;
14
- gap: 8px;
15
- align-self: stretch;
16
- border-radius: var(--Border-Radius-border-radius-md, 8px);
17
- border: 0.5px solid var(--colors-border-secondary, #DCDEE0);
18
- background: ${({ colorPalette }) => colorPalette.background.primary};
9
+ const Container = styled.div `
10
+ display: flex;
11
+ padding: 16px 24px;
12
+ flex-direction: column;
13
+ align-items: flex-start;
14
+ gap: 8px;
15
+ align-self: stretch;
16
+ border-radius: var(--Border-Radius-border-radius-md, 8px);
17
+ border: 0.5px solid var(--colors-border-secondary, #DCDEE0);
18
+ background: ${({ colorPalette }) => colorPalette.background.primary};
19
19
  `;
20
- const Created = styled.div `
21
- display: flex;
22
- padding: 0px 8px;
23
- gap: 8px;
24
- width: 100%;
20
+ const Created = styled.div `
21
+ display: flex;
22
+ padding: 0px 8px;
23
+ gap: 8px;
24
+ width: 100%;
25
25
  `;
26
- const BadgeContainer = styled.div `
27
- padding-top: 2px;
26
+ const BadgeContainer = styled.div `
27
+ padding-top: 2px;
28
28
  `;
29
- const CreatedText = styled.p `
30
- margin: 0px;
31
- padding-top: 8px;
32
- color: ${({ colorPalette }) => colorPalette.text.primary}
29
+ const CreatedText = styled.p `
30
+ margin: 0px;
31
+ padding-top: 8px;
32
+ color: ${({ colorPalette }) => colorPalette.text.primary}
33
33
  `;
34
- const DropdownContainer = styled.div `
35
- width: 100%;
36
- display: flex;
37
- padding: 0px 8px 8px 8px;
38
- flex-direction: column;
34
+ const DropdownContainer = styled.div `
35
+ width: 100%;
36
+ display: flex;
37
+ padding: 0px 8px 8px 8px;
38
+ flex-direction: column;
39
39
  `;
40
- const RoleDescriptionContainer = styled.div `
41
- display: flex;
42
- flex-direction: column
40
+ const RoleDescriptionContainer = styled.div `
41
+ display: flex;
42
+ flex-direction: column
43
43
  `;
44
- const RoleDescriptionParagraph = styled.p `
45
- font-size: 14px;
46
- font-style: italic;
47
- font-weight: 400;
48
- line-height: 20px;
49
- margin: 0px;
50
- color: ${({ colorPalette }) => colorPalette.text.primary}
44
+ const RoleDescriptionParagraph = styled.p `
45
+ font-size: 14px;
46
+ font-style: italic;
47
+ font-weight: 400;
48
+ line-height: 20px;
49
+ margin: 0px;
50
+ color: ${({ colorPalette }) => colorPalette.text.primary}
51
51
  `;
52
- const RoleNameParagraph = styled.h2 `
53
- font-size: 14px;
54
- font-style: italic;
55
- font-weight: 700;
56
- line-height: 20px;
57
- margin: 0px;
58
- color: ${({ colorPalette }) => colorPalette.text.primary}
52
+ const RoleNameParagraph = styled.h2 `
53
+ font-size: 14px;
54
+ font-style: italic;
55
+ font-weight: 700;
56
+ line-height: 20px;
57
+ margin: 0px;
58
+ color: ${({ colorPalette }) => colorPalette.text.primary}
59
59
  `;
60
- const EmailWrapper = styled.div `
61
- width: 100%;
62
- min-width: 60px;
63
- min-height: 30px;
64
- height: 38px;
65
- border-radius: 4px;
66
- border-width: 1px;
67
- border-style: solid;
68
- border-color: ${({ colorPalette }) => colorPalette.background.disabledInput};
69
- background-color: ${({ colorPalette }) => colorPalette.background.disabledInput};
60
+ const EmailWrapper = styled.div `
61
+ width: 100%;
62
+ min-width: 60px;
63
+ min-height: 30px;
64
+ height: 38px;
65
+ border-radius: 4px;
66
+ border-width: 1px;
67
+ border-style: solid;
68
+ border-color: ${({ colorPalette }) => colorPalette.background.disabledInput};
69
+ background-color: ${({ colorPalette }) => colorPalette.background.disabledInput};
70
70
  `;
71
- const PseudoInput = styled.div `
72
- display: flex;
73
- align-items: center;
74
- justify-content: space-between;
75
- gap: 16px;
76
- font-weight: 600;
77
- font-size: 16px;
78
- display: flex;
79
- padding: 3px 12px 3px 16px;
80
- cursor: default;
81
- color: ${({ colorPalette }) => colorPalette.text.primary};
82
- ::placeholder {
83
- font-weight: 500;
84
- }
71
+ const PseudoInput = styled.div `
72
+ display: flex;
73
+ align-items: center;
74
+ justify-content: space-between;
75
+ gap: 16px;
76
+ font-weight: 600;
77
+ font-size: 16px;
78
+ display: flex;
79
+ padding: 3px 12px 3px 16px;
80
+ cursor: default;
81
+ color: ${({ colorPalette }) => colorPalette.text.primary};
82
+ ::placeholder {
83
+ font-weight: 500;
84
+ }
85
85
  `;
86
86
  export function EditUserPerms(props) {
87
87
  const { user, handleChange, roles, theme } = props;
@@ -3,44 +3,44 @@ import styled from "@emotion/styled";
3
3
  import { FiRefreshCw } from "react-icons/fi";
4
4
  import { Button } from "../../Atoms/Buttons/Button";
5
5
  import { Typography } from "../../Atoms/Typography/Typography";
6
- const ErrorSplashContainer = styled.div `
7
- background-color: ${({ colorPalette }) => colorPalette.background.primary};
8
- display: flex;
9
- flex-direction: column;
10
- align-self: stretch;
11
- flex-grow: 1;
6
+ const ErrorSplashContainer = styled.div `
7
+ background-color: ${({ colorPalette }) => colorPalette.background.primary};
8
+ display: flex;
9
+ flex-direction: column;
10
+ align-self: stretch;
11
+ flex-grow: 1;
12
12
  `;
13
- const HeaderDiv = styled.div `
14
- padding: 24px;
15
- flex-direction: column;
16
- align-items: center;
17
- gap: 16px;
18
- align-self: stretch;
19
- color: ${({ colorPalette }) => colorPalette.text.primary};
20
- border-width: 0 0 1px 0;
21
- border-style: solid;
22
- text-align: center;
23
- border-color: ${({ colorPalette }) => colorPalette.background.secondary};
13
+ const HeaderDiv = styled.div `
14
+ padding: 24px;
15
+ flex-direction: column;
16
+ align-items: center;
17
+ gap: 16px;
18
+ align-self: stretch;
19
+ color: ${({ colorPalette }) => colorPalette.text.primary};
20
+ border-width: 0 0 1px 0;
21
+ border-style: solid;
22
+ text-align: center;
23
+ border-color: ${({ colorPalette }) => colorPalette.background.secondary};
24
24
  `;
25
- const DescriptionDiv = styled.div `
26
- margin-top: 24px;
27
- text-align: center;
25
+ const DescriptionDiv = styled.div `
26
+ margin-top: 24px;
27
+ text-align: center;
28
28
  `;
29
- const BackgroundDiv = styled.div `
30
- display: flex;
31
- height: 245px;
32
- justify-content: center;
33
- align-items: center;
34
- align-content: center;
35
- gap: 16px;
36
- flex-shrink: 0;
37
- align-self: stretch;
38
- flex-wrap: wrap;
39
- flex-grow: 1;
40
- background-image: ${({ backgroundImage }) => `url(${backgroundImage})`};
41
- backgroundSize: cover;
42
- backgroundRepeat: no-repeat;
43
- overflowY: auto;
29
+ const BackgroundDiv = styled.div `
30
+ display: flex;
31
+ height: 245px;
32
+ justify-content: center;
33
+ align-items: center;
34
+ align-content: center;
35
+ gap: 16px;
36
+ flex-shrink: 0;
37
+ align-self: stretch;
38
+ flex-wrap: wrap;
39
+ flex-grow: 1;
40
+ background-image: ${({ backgroundImage }) => `url(${backgroundImage})`};
41
+ backgroundSize: cover;
42
+ backgroundRepeat: no-repeat;
43
+ overflowY: auto;
44
44
  `;
45
45
  // This will replace the ContactContainer when we have the ambassador program set up
46
46
  // const AmbassadorContactDiv = styled.div<{ colorPalette: Colors }>`
@@ -53,15 +53,15 @@ const BackgroundDiv = styled.div `
53
53
  // gap: 16px;
54
54
  // align-self: stretch;
55
55
  // `;
56
- const ContactContainer = styled.div `
57
- background-color: ${({ colors }) => colors.background.tertiary};
58
- color: ${({ colors }) => colors.text.primary};
59
- display: flex;
60
- padding: 24px 16px;
61
- flex-direction: column;
62
- align-items: center;
63
- gap: 16px;
64
- align-self: stretch;
56
+ const ContactContainer = styled.div `
57
+ background-color: ${({ colors }) => colors.background.tertiary};
58
+ color: ${({ colors }) => colors.text.primary};
59
+ display: flex;
60
+ padding: 24px 16px;
61
+ flex-direction: column;
62
+ align-items: center;
63
+ gap: 16px;
64
+ align-self: stretch;
65
65
  `;
66
66
  export const ErrorSplash = (props) => {
67
67
  const { colorPalette, title, description, image, backgroundImage, errorMessage, refreshOnClick, ...tableHtmlProps } = props;
@@ -45,6 +45,10 @@ export declare const ModalInputBox: import("@emotion/styled").StyledComponent<{
45
45
  theme?: import("@emotion/react").Theme;
46
46
  as?: React.ElementType;
47
47
  }, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
48
+ export declare const ConfirmationInput: import("@emotion/styled").StyledComponent<{
49
+ theme?: import("@emotion/react").Theme;
50
+ as?: React.ElementType;
51
+ }, React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, {}>;
48
52
  interface ModalProps extends React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement> {
49
53
  open: boolean;
50
54
  children: React.ReactNode;
@@ -72,6 +76,7 @@ interface ConfirmationModalProps extends React.DetailedHTMLProps<React.HTMLAttri
72
76
  canMinimize?: boolean;
73
77
  minimized?: boolean;
74
78
  modal?: boolean;
79
+ confirmationText?: string;
75
80
  }
76
81
  export declare const ConfirmationModal: (props: ConfirmationModalProps) => React.JSX.Element;
77
82
  export {};
@@ -1,90 +1,102 @@
1
- import React from "react";
1
+ import React, { useState } from "react";
2
2
  import * as Dialog from "@radix-ui/react-dialog";
3
3
  import styled from "@emotion/styled";
4
4
  import { Button } from "../../Atoms/Buttons/Button";
5
5
  import { FiX } from "react-icons/fi";
6
6
  import { useEffect } from "react";
7
- export const StyledDialog = styled(Dialog.Overlay) `
8
- ${({ colorPalette, toast }) => !toast && `background-color: ${colorPalette.background.secondary}`};
9
- opacity: 0.8;
10
- position: absolute;
11
- inset: 0;
12
- animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
13
- z-index: 1000;
7
+ export const StyledDialog = styled(Dialog.Overlay) `
8
+ ${({ colorPalette, toast }) => !toast && `background-color: ${colorPalette.background.secondary}`};
9
+ opacity: 0.8;
10
+ position: absolute;
11
+ inset: 0;
12
+ animation: overlayShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
13
+ z-index: 1000;
14
14
  `;
15
- export const StyledContent = styled(Dialog.Content) `
15
+ export const StyledContent = styled(Dialog.Content) `
16
16
  ${({ colorPalette, toast }) => !toast
17
17
  ? `background-color: ${colorPalette.background.primary}; color: ${colorPalette.text.primary};`
18
- : `background-color: ${colorPalette.toastBackground[toast]}; color: ${colorPalette.toastText[toast]};`};
19
- box-shadow: ${({ colorPalette }) => `${colorPalette.background.secondary} 0px 5px 15px`};
20
- ${({ toast }) => !toast && `border-radius: 4px;`};
21
- position: absolute;
22
- top: ${({ toast }) => (toast ? "64px" : "50%")};
23
- ${({ minimized }) => minimized && "top: 45px"};
24
- left: 50%;
25
- transform: translate(-50%, -50%);
26
- max-height: 85vh;
27
- animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
28
- z-index: 1000;
29
- display: flex;
30
- flex-direction: column;
31
- min-width: ${({ minimized }) => (minimized ? "100px" : "300px")};
32
- ${({ toast }) => toast && `width: 100%;`};
33
- ${({ minimized }) => minimized && "width: 30%"};
34
- gap: 16px;
35
- :focus {
36
- outline: none;
37
- }
18
+ : `background-color: ${colorPalette.toastBackground[toast]}; color: ${colorPalette.toastText[toast]};`};
19
+ box-shadow: ${({ colorPalette }) => `${colorPalette.background.secondary} 0px 5px 15px`};
20
+ ${({ toast }) => !toast && `border-radius: 4px;`};
21
+ position: absolute;
22
+ top: ${({ toast }) => (toast ? "64px" : "50%")};
23
+ ${({ minimized }) => minimized && "top: 45px"};
24
+ left: 50%;
25
+ transform: translate(-50%, -50%);
26
+ max-height: 85vh;
27
+ animation: contentShow 150ms cubic-bezier(0.16, 1, 0.3, 1);
28
+ z-index: 1000;
29
+ display: flex;
30
+ flex-direction: column;
31
+ min-width: ${({ minimized }) => (minimized ? "100px" : "300px")};
32
+ ${({ toast }) => toast && `width: 100%;`};
33
+ ${({ minimized }) => minimized && "width: 30%"};
34
+ gap: 16px;
35
+ :focus {
36
+ outline: none;
37
+ }
38
38
  `;
39
- export const DialogContainer = styled.div `
40
- display: flex;
41
- padding: 24px 24px 0px 24px;
42
- flex-direction: column;
43
- align-items: center;
44
- gap: 16px;
45
- align-self: stretch;
39
+ export const DialogContainer = styled.div `
40
+ display: flex;
41
+ padding: 24px 24px 0px 24px;
42
+ flex-direction: column;
43
+ align-items: center;
44
+ gap: 16px;
45
+ align-self: stretch;
46
46
  `;
47
- export const ModalTitleContainer = styled.div `
48
- display: flex;
49
- justify-content: space-between;
50
- align-items: center;
51
- width: 100%;
47
+ export const ModalTitleContainer = styled.div `
48
+ display: flex;
49
+ justify-content: space-between;
50
+ align-items: center;
51
+ width: 100%;
52
52
  `;
53
- export const ModalTitle = styled.div `
54
- font-size: ${({ minimized }) => (minimized ? "12px" : "24px")};
55
- font-style: normal;
56
- font-weight: 600;
57
- line-height: 150%;
53
+ export const ModalTitle = styled.div `
54
+ font-size: ${({ minimized }) => (minimized ? "12px" : "24px")};
55
+ font-style: normal;
56
+ font-weight: 600;
57
+ line-height: 150%;
58
58
  `;
59
- export const ModalHeading = styled.div `
60
- font-size: 16px;
61
- font-style: normal;
62
- font-weight: 700;
63
- line-height: 150%;
59
+ export const ModalHeading = styled.div `
60
+ font-size: 16px;
61
+ font-style: normal;
62
+ font-weight: 700;
63
+ line-height: 150%;
64
64
  `;
65
- export const ModelSubHeading = styled.div `
66
- font-size: 16px;
67
- font-style: normal;
68
- font-weight: 400;
69
- line-height: 24px; /* 150% */
70
- letter-spacing: 0.16px;
71
- width: 100%;
65
+ export const ModelSubHeading = styled.div `
66
+ font-size: 16px;
67
+ font-style: normal;
68
+ font-weight: 400;
69
+ line-height: 24px; /* 150% */
70
+ letter-spacing: 0.16px;
71
+ width: 100%;
72
+ white-space: pre-line;
72
73
  `;
73
- export const ModalFooter = styled.div `
74
- display: flex;
75
- padding: 24px 16px;
76
- justify-content: center;
77
- align-items: center;
78
- gap: 16px;
79
- align-self: stretch;
74
+ export const ModalFooter = styled.div `
75
+ display: flex;
76
+ padding: 24px 16px;
77
+ justify-content: center;
78
+ align-items: center;
79
+ gap: 16px;
80
+ align-self: stretch;
80
81
  `;
81
- export const ModalInputBox = styled.div `
82
- display: flex;
83
- width: 322px;
84
- flex-direction: column;
85
- justify-content: center;
86
- align-items: flex-start;
87
- gap: 8px;
82
+ export const ModalInputBox = styled.div `
83
+ display: flex;
84
+ width: 322px;
85
+ flex-direction: column;
86
+ justify-content: center;
87
+ align-items: flex-start;
88
+ gap: 8px;
89
+ `;
90
+ export const ConfirmationInput = styled.input `
91
+ display: flex;
92
+ width: 275px;
93
+ flex-direction: column;
94
+ align-items: flex-start;
95
+ gap: 8px;
96
+ height: 40px;
97
+ padding: 8px 16px;
98
+ justify-content: center;
99
+ flex: 1 0 0;
88
100
  `;
89
101
  export const Modal = (props) => {
90
102
  const { open, children, colorPalette, setOpen, toast, timeout, canMinimize, setMinimized, minimized, modal, ...htmlProps } = props;
@@ -112,15 +124,17 @@ export const Modal = (props) => {
112
124
  }, onPointerDownOutside: () => setOpen(false), onClick: () => canMinimize && setMinimized && setMinimized(!minimized), toast: toast, minimized: minimized }, children))));
113
125
  };
114
126
  export const ConfirmationModal = (props) => {
115
- const { colorPalette, setOpen, confirmTitle, details, handleSubmit, open, toast, canClose, timeout, canMinimize, setMinimized, minimized, modal, ...htmlProps } = props;
127
+ const { colorPalette, setOpen, confirmTitle, details, handleSubmit, open, toast, canClose, timeout, canMinimize, setMinimized, minimized, modal, confirmationText, ...htmlProps } = props;
128
+ const [confirmationInputValue, setConfirmationInputValue] = useState("");
116
129
  return (React.createElement(Modal, { colorPalette: colorPalette, open: open, setOpen: setOpen, ...htmlProps, toast: toast, timeout: timeout, canMinimize: canMinimize, setMinimized: setMinimized, minimized: minimized, modal: modal },
117
130
  React.createElement(DialogContainer, { ...(toast ? { style: { padding: "24px" } } : {}) },
118
131
  React.createElement(ModalTitleContainer, null,
119
132
  React.createElement(ModalTitle, { minimized: minimized }, confirmTitle),
120
133
  canClose && React.createElement(FiX, { onClick: () => setOpen(false), size: 24 })),
121
134
  React.createElement(ModelSubHeading, null, details),
135
+ confirmationText && (React.createElement(ConfirmationInput, { type: "text", placeholder: `Type ${confirmationText} to confirm this action...`, value: confirmationInputValue, onChange: (e) => setConfirmationInputValue(e.target.value), "aria-label": `Confirmation input: Type ${confirmationText} to confirm this action` })),
122
136
  !toast && (React.createElement(ModalFooter, null,
123
- React.createElement(Button, { colorPalette: colorPalette, variant: "filled", label: "Ok", onClick: handleSubmit }),
137
+ confirmationText ? (React.createElement(Button, { colorPalette: colorPalette, variant: "filled", disabled: confirmationInputValue !== confirmationText, label: "Ok", onClick: handleSubmit })) : (React.createElement(Button, { colorPalette: colorPalette, variant: "filled", label: "Ok", onClick: handleSubmit })),
124
138
  React.createElement(Button, { colorPalette: colorPalette, variant: "destructive", label: "Cancel", onClick: () => setOpen(false) }))))));
125
139
  };
126
140
  //# sourceMappingURL=Modal.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.js","sourceRoot":"","sources":["../../../lib/Organisms/Modal/Modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,O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BAAC,WAAW;gBACV,gBAAgB,CAAC,CAAC,CAAC,CACnB,oBAAC,MAAM,IACN,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAC,QAAQ,EAChB,QAAQ,EAAE,sBAAsB,KAAK,gBAAgB,EACrD,KAAK,EAAC,IAAI,EACV,OAAO,EAAE,YAAY,GACpB,CACF,CAAC,CAAC,CAAC,CACH,oBAAC,MAAM,IACN,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAC,QAAQ,EAChB,KAAK,EAAC,IAAI,EACV,OAAO,EAAE,YAAY,GACpB,CACF;gBACD,oBAAC,MAAM,IACN,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAC,aAAa,EACrB,KAAK,EAAC,QAAQ,EACd,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,GAC5B,CACW,CACd,CACgB,CACX,CACR,CAAC;AACH,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import { Colors } from "Theme/types";
3
+ interface ErrorSplashProps {
4
+ colorPalette: Colors & string;
5
+ title: string;
6
+ description: string;
7
+ image?: string;
8
+ }
9
+ export declare const ErrorSplash: (props: ErrorSplashProps) => React.JSX.Element;
10
+ export {};
@@ -0,0 +1,82 @@
1
+ import React from "react";
2
+ import styled from "@emotion/styled";
3
+ import { FiChevronLeft, FiRefreshCw } from "react-icons/fi";
4
+ import { GoBug } from "react-icons/go";
5
+ import { Button } from "../../Atoms/Buttons/Button";
6
+ import { Typography } from "../../Atoms/Typography/Typography";
7
+ const ErrorSplashContainer = styled.div `
8
+ // width: 100vw;
9
+ // height: 100vh;
10
+
11
+ `;
12
+ const HeaderDiv = styled.div `
13
+ display: flex;
14
+ padding: 24px;
15
+ flex-direction: column;
16
+ align-items: flex-start;
17
+ gap: 16px;
18
+ align-self: stretch;
19
+ `;
20
+ const HeaderAndBackDiv = styled.div `
21
+ display: flex;
22
+ justify-content: space-between;
23
+ align-items: center;
24
+ align-self: stretch;
25
+ `;
26
+ const DescriptionDiv = styled.div `
27
+ display: -webkit-box;
28
+ -webkit-box-orient: vertical;
29
+ -webkit-line-clamp: 2;
30
+ flex: 1 0 0;
31
+ `;
32
+ const ButtonsDiv = styled.div `
33
+ //background is the topo image
34
+ display: flex;
35
+ height: 245px;
36
+ justify-content: center;
37
+ align-items: center;
38
+ align-content: center;
39
+ gap: 16px;
40
+ flex-shrink: 0;
41
+ align-self: stretch;
42
+ flex-wrap: wrap;
43
+ `;
44
+ const AmbassadorContactDiv = styled.div `
45
+ background-color: ${({ colorPalette }) => colorPalette.background.tertiary};
46
+ border-top: ${({ colorPalette }) => colorPalette.border.tertiary} 1px solid;
47
+ display: flex;
48
+ padding: 24px 16px;
49
+ flex-direction: column;
50
+ align-items: center;
51
+ gap: 16px;
52
+ align-self: stretch;
53
+ `;
54
+ const ContactContainer = styled.div `
55
+ background-color: ${({ colors }) => colors.background.tertiary};
56
+ color: ${({ colors }) => colors.text.primary};
57
+ display: flex;
58
+ padding: 24px 16px;
59
+ flex-direction: column;
60
+ align-items: center;
61
+ gap: 16px;
62
+ align-self: stretch;
63
+ `;
64
+ export const ErrorSplash = (props) => {
65
+ const { colorPalette, title, description, image, ...tableHtmlProps } = props;
66
+ console.log("colorPalette:", colorPalette);
67
+ return (React.createElement(ErrorSplashContainer, { colorPalette: colorPalette, ...tableHtmlProps },
68
+ React.createElement(HeaderDiv, { colorPalette: colorPalette },
69
+ React.createElement(HeaderAndBackDiv, { colorPalette: colorPalette },
70
+ React.createElement(FiChevronLeft, null),
71
+ React.createElement(Typography, { textColor: colorPalette.text.primary, content: title, variant: "Heading 3" })),
72
+ React.createElement(DescriptionDiv, { colorPalette: colorPalette },
73
+ React.createElement(Typography, { textColor: colorPalette.text.primary, content: description, variant: "Paragraphy Body" }))),
74
+ image && React.createElement("img", { src: image, alt: "Splash Image" }),
75
+ React.createElement(ButtonsDiv, { colorPalette: colorPalette },
76
+ React.createElement(Button, { colorPalette: colorPalette, onClick: () => { }, label: "Refresh", variant: "outlined", icon: React.createElement(FiRefreshCw, null) }),
77
+ React.createElement(Button, { colorPalette: colorPalette, onClick: () => { }, label: "Report a bug", variant: "filled", icon: React.createElement(GoBug, null) })),
78
+ React.createElement(ContactContainer, { colors: colorPalette },
79
+ React.createElement(Typography, { textColor: colorPalette.text.primary, content: "Please ask further questions, or reach out for additional support by emailing", variant: "Label" }),
80
+ React.createElement(Typography, { textColor: colorPalette.text.primary, content: "devs@factorearth.com", variant: "Heading 4" }))));
81
+ };
82
+ //# sourceMappingURL=Splash.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Splash.js","sourceRoot":"","sources":["../../../lib/Organisms/Splash/Splash.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAEnD,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,WAAW,EAAoC,MAAM,gBAAgB,CAAC;AAC9F,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAA0B;;;;CAIhE,CAAC;AAEF,MAAM,SAAS,GAAG,MAAM,CAAC,GAAG,CAA0B;;;;;;;CAOrD,CAAC;AAEF,MAAM,gBAAgB,GAAG,MAAM,CAAC,GAAG,CAA0B;;;;;CAK5D,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,GAAG,CAA0B;;;;;CAK1D,CAAC;AAEF,MAAM,UAAU,GAAG,MAAM,CAAC,GAAG,CAA0B;;;;;;;;;;;CAWtD,CAAC;AAEF,MAAM,oBAAoB,GAAG,MAAM,CAAC,GAAG,CAA0B;qBAC5C,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,QAAQ;eAC5D,CAAC,EAA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