@factorearth/component-library 5.4.29-alpha.0 → 5.4.29

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.
@@ -4,99 +4,99 @@ 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%;
72
- white-space: pre-line;
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;
73
73
  `;
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;
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;
81
81
  `;
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;
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
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;
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;
100
100
  `;
101
101
  export const Modal = (props) => {
102
102
  const { open, children, colorPalette, setOpen, toast, timeout, canMinimize, setMinimized, minimized, modal, ...htmlProps } = props;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@factorearth/component-library",
3
- "version": "5.4.29-alpha.0",
3
+ "version": "5.4.29",
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": "b83445c6fe41c938747d7ebbb46ccfa0c078e251",
49
+ "gitHead": "39c6bd91498ca895270a6806bfea4f252e166abe",
50
50
  "dependencies": {
51
51
  "@emotion/react": "^11.13.0",
52
52
  "@emotion/styled": "^11.13.0",