@factorearth/component-library 6.2.3 → 6.2.4-datefield.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/DateField/DateField.js +1 -0
- package/dist/Atoms/DateField/DateField.js.map +1 -1
- package/dist/Hooks/useProgress.d.ts +19 -0
- package/dist/Hooks/useProgress.js +28 -0
- package/dist/Hooks/useProgress.js.map +1 -0
- package/dist/Molecules/NavMenu/NavMenu.js +124 -124
- package/dist/Organisms/Modal/Modal.js +82 -82
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateField.js","sourceRoot":"","sources":["../../../lib/Atoms/DateField/DateField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,MAAM,MAAM,iBAAiB,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5C,OAAO,UAAU,MAAM,kBAAkB,CAAC;AAC1C,OAAO,4CAA4C,CAAC;AAEpD,MAAM,QAAQ,GAAG,MAAM,CAAC,UAAU,CAAC,CAGjC;UACQ,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO;eAC1C,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,UAAU,CAAC,OAAO;;;iBAGnD,CAAC,EAAE,YAAY,EAAE,EAAE,EAAE,CAAC,YAAY,CAAC,MAAM,CAAC,OAAO;;;;;;;GAO/D,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,
|
|
1
|
+
{"version":3,"file":"DateField.js","sourceRoot":"","sources":["../../../lib/Atoms/DateField/DateField.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EA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IAAI,KAAK,QAAQ,EAAE,CAAC;oBAC1B,IAAI,QAAQ,GAAI,CAAC,EAAE,MAA2B,EAAE,KAAK,CAAC;oBACtD,IACC,QAAQ,CAAC,KAAK,CAAC,oDAAoD,CAAC,EACnE,CAAC;wBACF,QAAQ,GAAG,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;wBACxC,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,QAAQ,GAAG,WAAW,CAAC,CAAC;wBACnD,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;wBAC9C,eAAe,CAAC,SAAS,CAAC,CAAC;oBAC5B,CAAC;yBAAM,IAAI,QAAQ,KAAK,EAAE,EAAE,CAAC;wBAC5B,YAAY,CAAC,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,CAAC,CAAC;wBACxC,eAAe,CAAC,IAAI,CAAC,CAAC;oBACvB,CAAC;yBAAM,CAAC;wBACP,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;oBACpC,CAAC;gBACF,CAAC;YACF,CAAC,EACD,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,aAAa,EAClB,UAAU,EAAE,YAAY,GACvB;QACF,oBAAC,QAAQ,IACR,YAAY,EAAE,YAAY,EAC1B,OAAO,EAAE,eAAe,EACxB,WAAW,EAAE,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,GAC1C;QACD,WAAW,IAAI,WAAW,CACP,CACrB,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ToastVariant } from "Organisms/Modal/Modal";
|
|
2
|
+
import { PercentValue } from "../Atoms/ProgressBar/ProgressBar";
|
|
3
|
+
interface Props {
|
|
4
|
+
initial: ProgressMetadata;
|
|
5
|
+
}
|
|
6
|
+
export interface ProgressMetadata {
|
|
7
|
+
canClose: boolean;
|
|
8
|
+
message: string;
|
|
9
|
+
show: boolean;
|
|
10
|
+
timeout?: number;
|
|
11
|
+
title: string;
|
|
12
|
+
value: PercentValue;
|
|
13
|
+
variant: ToastVariant;
|
|
14
|
+
}
|
|
15
|
+
export declare function useProgress(props?: Props): {
|
|
16
|
+
progress: ProgressMetadata;
|
|
17
|
+
setProgress: (newProgress: Partial<ProgressMetadata>) => void;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { useState, useEffect } from "react";
|
|
2
|
+
const defaultProgress = {
|
|
3
|
+
canClose: false,
|
|
4
|
+
message: "",
|
|
5
|
+
show: false,
|
|
6
|
+
title: "",
|
|
7
|
+
value: 0,
|
|
8
|
+
variant: "info",
|
|
9
|
+
};
|
|
10
|
+
export function useProgress(props) {
|
|
11
|
+
const [progress, setProgress] = useState(props?.initial || defaultProgress);
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (progress.show && progress.timeout) {
|
|
14
|
+
const timeout = setTimeout(() => {
|
|
15
|
+
setProgress(props?.initial || defaultProgress);
|
|
16
|
+
}, progress.timeout);
|
|
17
|
+
return () => clearTimeout(timeout);
|
|
18
|
+
}
|
|
19
|
+
}, [progress.show, progress.timeout]);
|
|
20
|
+
function updateProgress(newProgress) {
|
|
21
|
+
setProgress((prev) => ({
|
|
22
|
+
...prev,
|
|
23
|
+
...newProgress,
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
return { progress, setProgress: updateProgress };
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=useProgress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProgress.js","sourceRoot":"","sources":["../../lib/Hooks/useProgress.tsx"],"names":[],"mappings":"AAEA,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAgBnD,MAAM,eAAe,GAAqB;IACzC,QAAQ,EAAE,KAAK;IACf,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,KAAK;IACX,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,CAAC;IACR,OAAO,EAAE,MAAM;CACf,CAAC;AAEF,MAAM,UAAU,WAAW,CAAC,KAAa;IACxC,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAmB,KAAK,EAAE,OAAO,IAAI,eAAe,CAAC,CAAC;IAE9F,SAAS,CAAC,GAAG,EAAE;QACd,IAAI,QAAQ,CAAC,IAAI,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;YACvC,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;gBAC/B,WAAW,CAAC,KAAK,EAAE,OAAO,IAAI,eAAe,CAAC,CAAC;YAChD,CAAC,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;YACrB,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;QACpC,CAAC;IACF,CAAC,EAAE,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC;IAEtC,SAAS,cAAc,CAAC,WAAsC;QAC7D,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACtB,GAAG,IAAI;YACP,GAAG,WAAW;SACd,CAAC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;AAClD,CAAC"}
|
|
@@ -3,144 +3,144 @@ import { keyframes } from "@emotion/react";
|
|
|
3
3
|
import React, { useState, useMemo, useRef, useEffect } from "react";
|
|
4
4
|
import { FiMenu, FiCloud, FiCloudOff, FiSun, FiMoon, FiChevronRight, FiX, } from "react-icons/fi";
|
|
5
5
|
import Toggle from "../../Atoms/Toggle/Toggle";
|
|
6
|
-
const slideInLeft = keyframes `
|
|
7
|
-
0% {
|
|
8
|
-
transform: translateX(-100%);
|
|
9
|
-
opacity: 0;
|
|
10
|
-
}
|
|
11
|
-
100% {
|
|
12
|
-
transform: translateX(0);
|
|
13
|
-
opacity: 1;
|
|
14
|
-
}
|
|
6
|
+
const slideInLeft = keyframes `
|
|
7
|
+
0% {
|
|
8
|
+
transform: translateX(-100%);
|
|
9
|
+
opacity: 0;
|
|
10
|
+
}
|
|
11
|
+
100% {
|
|
12
|
+
transform: translateX(0);
|
|
13
|
+
opacity: 1;
|
|
14
|
+
}
|
|
15
15
|
`;
|
|
16
|
-
const NavMenu = styled.div `
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
20
|
-
width: 100%;
|
|
16
|
+
const NavMenu = styled.div `
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
20
|
+
width: 100%;
|
|
21
21
|
`;
|
|
22
|
-
const NavBarHeader = styled.div `
|
|
23
|
-
display: flex;
|
|
24
|
-
justify-content: space-between;
|
|
25
|
-
align-items: center;
|
|
26
|
-
height: 88px;
|
|
27
|
-
border-width: 0 0 1px 0;
|
|
28
|
-
border-style: solid;
|
|
29
|
-
border-color: ${({ colorPalette }) => colorPalette.background.secondary};
|
|
30
|
-
width: 100%;
|
|
31
|
-
@media (max-width: 500px) {
|
|
32
|
-
justify-content: space-between;
|
|
33
|
-
flex-wrap: wrap;
|
|
34
|
-
align-items: center;
|
|
35
|
-
height: max-content;
|
|
36
|
-
}
|
|
22
|
+
const NavBarHeader = styled.div `
|
|
23
|
+
display: flex;
|
|
24
|
+
justify-content: space-between;
|
|
25
|
+
align-items: center;
|
|
26
|
+
height: 88px;
|
|
27
|
+
border-width: 0 0 1px 0;
|
|
28
|
+
border-style: solid;
|
|
29
|
+
border-color: ${({ colorPalette }) => colorPalette.background.secondary};
|
|
30
|
+
width: 100%;
|
|
31
|
+
@media (max-width: 500px) {
|
|
32
|
+
justify-content: space-between;
|
|
33
|
+
flex-wrap: wrap;
|
|
34
|
+
align-items: center;
|
|
35
|
+
height: max-content;
|
|
36
|
+
}
|
|
37
37
|
`;
|
|
38
|
-
const NavContent = styled.div `
|
|
39
|
-
align-items: center;
|
|
40
|
-
gap: 16px;
|
|
41
|
-
padding-top: 16px;
|
|
42
|
-
padding-bottom: 16px;
|
|
43
|
-
|
|
44
|
-
@media (max-width: 500px) {
|
|
45
|
-
justify-content: flex-end;
|
|
46
|
-
align-items: center;
|
|
47
|
-
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
48
|
-
width: ${({ isWrapped }) => (isWrapped ? "100%" : "fit-content")};
|
|
49
|
-
border-top: ${({ isWrapped, colorPalette }) => isWrapped ? `1px solid ${colorPalette.background.secondary}` : "none"};
|
|
50
|
-
}
|
|
38
|
+
const NavContent = styled.div `
|
|
39
|
+
align-items: center;
|
|
40
|
+
gap: 16px;
|
|
41
|
+
padding-top: 16px;
|
|
42
|
+
padding-bottom: 16px;
|
|
43
|
+
|
|
44
|
+
@media (max-width: 500px) {
|
|
45
|
+
justify-content: flex-end;
|
|
46
|
+
align-items: center;
|
|
47
|
+
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
48
|
+
width: ${({ isWrapped }) => (isWrapped ? "100%" : "fit-content")};
|
|
49
|
+
border-top: ${({ isWrapped, colorPalette }) => isWrapped ? `1px solid ${colorPalette.background.secondary}` : "none"};
|
|
50
|
+
}
|
|
51
51
|
`;
|
|
52
|
-
const OnlineStatus = styled.div `
|
|
53
|
-
display: flex;
|
|
54
|
-
padding: 8px 12px;
|
|
55
|
-
justify-content: center;
|
|
56
|
-
align-items: center;
|
|
57
|
-
gap: 8px;
|
|
58
|
-
border-radius: 32px;
|
|
59
|
-
font-weight: 700;
|
|
60
|
-
border-width: 1px;
|
|
61
|
-
border-style: solid;
|
|
62
|
-
border-color: ${({ colorPalette }) => colorPalette.buttonBackground.success};
|
|
63
|
-
color: ${({ colorPalette }) => colorPalette.buttonBackground.success};
|
|
64
|
-
background: #ebfaed;
|
|
65
|
-
cursor: pointer;
|
|
52
|
+
const OnlineStatus = styled.div `
|
|
53
|
+
display: flex;
|
|
54
|
+
padding: 8px 12px;
|
|
55
|
+
justify-content: center;
|
|
56
|
+
align-items: center;
|
|
57
|
+
gap: 8px;
|
|
58
|
+
border-radius: 32px;
|
|
59
|
+
font-weight: 700;
|
|
60
|
+
border-width: 1px;
|
|
61
|
+
border-style: solid;
|
|
62
|
+
border-color: ${({ colorPalette }) => colorPalette.buttonBackground.success};
|
|
63
|
+
color: ${({ colorPalette }) => colorPalette.buttonBackground.success};
|
|
64
|
+
background: #ebfaed;
|
|
65
|
+
cursor: pointer;
|
|
66
66
|
`;
|
|
67
|
-
const OfflineStatus = styled.div `
|
|
68
|
-
display: flex;
|
|
69
|
-
padding: 8px 12px;
|
|
70
|
-
justify-content: center;
|
|
71
|
-
align-items: center;
|
|
72
|
-
gap: 8px;
|
|
73
|
-
border-radius: 32px;
|
|
74
|
-
font-weight: 700;
|
|
75
|
-
border-width: 1px;
|
|
76
|
-
border-style: solid;
|
|
77
|
-
border-color: ${({ colorPalette }) => colorPalette.utils.icon};
|
|
78
|
-
color: ${({ colorPalette }) => colorPalette.utils.icon};
|
|
79
|
-
cursor: pointer;
|
|
67
|
+
const OfflineStatus = styled.div `
|
|
68
|
+
display: flex;
|
|
69
|
+
padding: 8px 12px;
|
|
70
|
+
justify-content: center;
|
|
71
|
+
align-items: center;
|
|
72
|
+
gap: 8px;
|
|
73
|
+
border-radius: 32px;
|
|
74
|
+
font-weight: 700;
|
|
75
|
+
border-width: 1px;
|
|
76
|
+
border-style: solid;
|
|
77
|
+
border-color: ${({ colorPalette }) => colorPalette.utils.icon};
|
|
78
|
+
color: ${({ colorPalette }) => colorPalette.utils.icon};
|
|
79
|
+
cursor: pointer;
|
|
80
80
|
`;
|
|
81
|
-
const NavMenuDropdown = styled.div `
|
|
82
|
-
width: 320px;
|
|
83
|
-
position: absolute;
|
|
84
|
-
top: 88px;
|
|
85
|
-
z-index: 1000;
|
|
86
|
-
box-shadow: 5px 5px 5px rgba(64, 64, 64, 0.2);
|
|
87
|
-
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
88
|
-
animation: ${slideInLeft} 0.5s ease-out forwards;
|
|
89
|
-
display: ${({ navOpen }) => (navOpen ? "flex" : "none")};
|
|
90
|
-
flex-direction: column;
|
|
91
|
-
&:focus {
|
|
92
|
-
outline: none;
|
|
93
|
-
}
|
|
81
|
+
const NavMenuDropdown = styled.div `
|
|
82
|
+
width: 320px;
|
|
83
|
+
position: absolute;
|
|
84
|
+
top: 88px;
|
|
85
|
+
z-index: 1000;
|
|
86
|
+
box-shadow: 5px 5px 5px rgba(64, 64, 64, 0.2);
|
|
87
|
+
background: ${({ colorPalette }) => colorPalette.background.primary};
|
|
88
|
+
animation: ${slideInLeft} 0.5s ease-out forwards;
|
|
89
|
+
display: ${({ navOpen }) => (navOpen ? "flex" : "none")};
|
|
90
|
+
flex-direction: column;
|
|
91
|
+
&:focus {
|
|
92
|
+
outline: none;
|
|
93
|
+
}
|
|
94
94
|
`;
|
|
95
|
-
const MenuItems = styled.div `
|
|
96
|
-
align-items: flex-start;
|
|
97
|
-
align-self: stretch;
|
|
95
|
+
const MenuItems = styled.div `
|
|
96
|
+
align-items: flex-start;
|
|
97
|
+
align-self: stretch;
|
|
98
98
|
`;
|
|
99
|
-
const MenuItem = styled.div `
|
|
100
|
-
display: flex;
|
|
101
|
-
padding: 8px 16px;
|
|
102
|
-
align-items: center;
|
|
103
|
-
color: ${({ colorPalette }) => colorPalette.text.tertiary};
|
|
104
|
-
font-weight: 700;
|
|
105
|
-
border-width: 0 0 1px 0;
|
|
106
|
-
border-style: solid;
|
|
107
|
-
border-color: ${({ colorPalette }) => colorPalette.background.secondary};
|
|
108
|
-
width: 288px;
|
|
109
|
-
cursor: pointer;
|
|
99
|
+
const MenuItem = styled.div `
|
|
100
|
+
display: flex;
|
|
101
|
+
padding: 8px 16px;
|
|
102
|
+
align-items: center;
|
|
103
|
+
color: ${({ colorPalette }) => colorPalette.text.tertiary};
|
|
104
|
+
font-weight: 700;
|
|
105
|
+
border-width: 0 0 1px 0;
|
|
106
|
+
border-style: solid;
|
|
107
|
+
border-color: ${({ colorPalette }) => colorPalette.background.secondary};
|
|
108
|
+
width: 288px;
|
|
109
|
+
cursor: pointer;
|
|
110
110
|
`;
|
|
111
|
-
const Location = styled.div `
|
|
112
|
-
display: flex;
|
|
113
|
-
align-items: center;
|
|
114
|
-
gap: 10px;
|
|
115
|
-
flex: 1 0 0;
|
|
116
|
-
font-size: 16px;
|
|
117
|
-
line-height: 150%;
|
|
111
|
+
const Location = styled.div `
|
|
112
|
+
display: flex;
|
|
113
|
+
align-items: center;
|
|
114
|
+
gap: 10px;
|
|
115
|
+
flex: 1 0 0;
|
|
116
|
+
font-size: 16px;
|
|
117
|
+
line-height: 150%;
|
|
118
118
|
`;
|
|
119
|
-
const Toggles = styled.div `
|
|
120
|
-
padding: 24px 0px;
|
|
119
|
+
const Toggles = styled.div `
|
|
120
|
+
padding: 24px 0px;
|
|
121
121
|
`;
|
|
122
|
-
const AppInfo = styled.div `
|
|
123
|
-
padding: 16px;
|
|
124
|
-
width: 288px;
|
|
125
|
-
background: ${({ colorPalette }) => colorPalette.background.tertiary};
|
|
122
|
+
const AppInfo = styled.div `
|
|
123
|
+
padding: 16px;
|
|
124
|
+
width: 288px;
|
|
125
|
+
background: ${({ colorPalette }) => colorPalette.background.tertiary};
|
|
126
126
|
`;
|
|
127
|
-
const LogoAndCopyRights = styled.div `
|
|
128
|
-
display: flex;
|
|
129
|
-
gap: 16px;
|
|
130
|
-
margin-bottom: 12px;
|
|
131
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
127
|
+
const LogoAndCopyRights = styled.div `
|
|
128
|
+
display: flex;
|
|
129
|
+
gap: 16px;
|
|
130
|
+
margin-bottom: 12px;
|
|
131
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
132
132
|
`;
|
|
133
|
-
const CopyRights = styled.div `
|
|
134
|
-
font-size: 12px;
|
|
135
|
-
font-style: normal;
|
|
136
|
-
font-weight: 400;
|
|
137
|
-
line-height: 55%;
|
|
133
|
+
const CopyRights = styled.div `
|
|
134
|
+
font-size: 12px;
|
|
135
|
+
font-style: normal;
|
|
136
|
+
font-weight: 400;
|
|
137
|
+
line-height: 55%;
|
|
138
138
|
`;
|
|
139
|
-
const Version = styled.div `
|
|
140
|
-
text-align: center;
|
|
141
|
-
font-size: 14px;
|
|
142
|
-
font-weight: 400;
|
|
143
|
-
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
139
|
+
const Version = styled.div `
|
|
140
|
+
text-align: center;
|
|
141
|
+
font-size: 14px;
|
|
142
|
+
font-weight: 400;
|
|
143
|
+
color: ${({ colorPalette }) => colorPalette.text.primary};
|
|
144
144
|
`;
|
|
145
145
|
const NavBar = (props) => {
|
|
146
146
|
const { colorPalette, locations, appInfo } = props;
|
|
@@ -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/dist/index.d.ts
CHANGED
|
@@ -30,8 +30,8 @@ export * from "./Organisms/Card/Card";
|
|
|
30
30
|
export * from "./Organisms/EditUserPerms/EditUserPerms";
|
|
31
31
|
export * from "./Organisms/ErrorSplash/ErrorSplash";
|
|
32
32
|
export * from "./Organisms/Modal/Modal";
|
|
33
|
-
export * from "./Organisms/Table/Table";
|
|
34
33
|
export * from "./Organisms/TabManager/TabManager";
|
|
34
|
+
export * from "./Organisms/Table/Table";
|
|
35
35
|
export * from "./Organisms/Tutorial/Tutorial";
|
|
36
36
|
export * from "./Theme/ThemeProvider";
|
|
37
37
|
export * from "./Theme/types";
|
package/dist/index.js
CHANGED
|
@@ -31,8 +31,8 @@ export * from "./Organisms/Card/Card";
|
|
|
31
31
|
export * from "./Organisms/EditUserPerms/EditUserPerms";
|
|
32
32
|
export * from "./Organisms/ErrorSplash/ErrorSplash";
|
|
33
33
|
export * from "./Organisms/Modal/Modal";
|
|
34
|
-
export * from "./Organisms/Table/Table";
|
|
35
34
|
export * from "./Organisms/TabManager/TabManager";
|
|
35
|
+
export * from "./Organisms/Table/Table";
|
|
36
36
|
export * from "./Organisms/Tutorial/Tutorial";
|
|
37
37
|
export * from "./Theme/ThemeProvider";
|
|
38
38
|
export * from "./Theme/types";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../lib/index.ts"],"names":[],"mappings":"AAAA,6CAA6C;AAE7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qBAAqB,CAAC;AACpC,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kCAAkC,CAAC;AACjD,cAAc,yCAAyC,CAAC;AACxD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,mCAAmC,CAAC;AAClD,cAAc,6CAA6C,CAAC;AAC5D,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yCAAyC,CAAC;AACxD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2CAA2C,CAAC;AAC1D,cAAc,iCAAiC,CAAC;AAChD,cAAc,iCAAiC,CAAC;AAChD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,iBAAiB,CAAC;AAChC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC;AACtC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,qCAAqC,CAAC;AACpD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,yCAAyC,CAAC;AACxD,cAAc,qCAAqC,CAAC;AACpD,cAAc,yBAAyB,CAAC;AACxC,cAAc,mCAAmC,CAAC;AAClD,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@factorearth/component-library",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.4-datefield.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",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"access": "public",
|
|
48
48
|
"registry": "https://registry.npmjs.org/"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "e5f4443e6614f2758bf18f8dad967d13328074d5",
|
|
51
51
|
"dependencies": {
|
|
52
52
|
"@emotion/react": "^11.13.0",
|
|
53
53
|
"@emotion/styled": "^11.13.0",
|