@canmingir/link 1.2.27 → 1.2.31
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/package.json +9 -5
- package/src/assets/illustrations/avatar-shape.jsx +6 -7
- package/src/assets/illustrations/booking-illustration.jsx +4 -14
- package/src/assets/illustrations/check-in-illustration.jsx +4 -10
- package/src/assets/illustrations/check-out-illustration.jsx +4 -3
- package/src/assets/illustrations/coming-soon-illustration.jsx +4 -17
- package/src/assets/illustrations/forbidden-illustration.jsx +4 -12
- package/src/assets/illustrations/maintenance-illustration.jsx +4 -24
- package/src/assets/illustrations/motivation-illustration.jsx +4 -9
- package/src/assets/illustrations/order-complete-illustration.jsx +4 -12
- package/src/assets/illustrations/page-not-found-illustration.jsx +4 -9
- package/src/assets/illustrations/seo-illustration.jsx +4 -16
- package/src/assets/illustrations/sever-error-illustration.jsx +4 -21
- package/src/assets/illustrations/upgrade-storage-illustration.jsx +4 -20
- package/src/assets/illustrations/upload-illustration.jsx +4 -81
- package/src/components/TopNavBar/TopNavBar.jsx +6 -2
- package/src/components/file-thumbnail/file-thumbnail.jsx +5 -6
- package/src/components/label/label.jsx +0 -4
- package/src/components/nav-section/horizontal/nav-section-horizontal.jsx +5 -6
- package/src/components/settings/drawer/layout-options.jsx +5 -4
- package/src/components/settings/drawer/presets-options.jsx +6 -5
- package/src/components/settings/drawer/settings-drawer.jsx +7 -4
- package/src/components/settings/drawer/stretch-options.jsx +5 -5
- package/src/layouts/DashboardLayout/header.jsx +5 -4
- package/src/layouts/DashboardLayout/nav-mini.jsx +5 -7
- package/src/layouts/DashboardLayout/nav-vertical.jsx +11 -11
- package/src/layouts/FullScreenLayout/FullScreenLayout.jsx +5 -1
- package/src/layouts/FullScreenLayout/nav-vertical.jsx +11 -11
- package/src/layouts/MainLayout/footer.jsx +7 -7
- package/src/layouts/MainLayout/header.jsx +3 -2
- package/src/layouts/MainLayout/nav/desktop/nav-list.jsx +8 -8
- package/src/layouts/MainLayout/nav/mobile/index.jsx +7 -6
- package/src/layouts/TwoSideLayout/TwoSideLayout.jsx +9 -3
- package/src/layouts/auth/classic.jsx +6 -6
- package/src/layouts/auth/modern.jsx +49 -85
- package/src/layouts/common/ProjectBar/index.jsx +13 -11
- package/src/layouts/common/header-sim.jsx +3 -2
- package/src/layouts/common/header-simple.jsx +6 -3
- package/src/layouts/common/notifications-popover/index.jsx +18 -13
- package/src/layouts/common/notifications-popover/notification-item.jsx +28 -16
- package/src/lib/APIPath/APIPath.jsx +2 -2
- package/src/lib/APITree/APITree.jsx +3 -1
- package/src/lib/AddItemWizard/AddItemWizard.jsx +21 -10
- package/src/lib/CustomBreadcrumbs/CustomBreadcrumbs.jsx +3 -2
- package/src/lib/Flow/layouts/CardLayout.jsx +4 -3
- package/src/lib/Flow/nodes/DefaultCard.jsx +6 -8
- package/src/lib/IconSelector/IconSelector.jsx +5 -1
- package/src/lib/ItemSummary/ItemSummary.jsx +11 -6
- package/src/lib/ItemSummary/ItemsSummary.jsx +38 -26
- package/src/lib/Label/Label.jsx +0 -4
- package/src/lib/ResourceMenu/ResourceMenu.jsx +3 -1
- package/src/lib/SparkleInput/SparkleInput.jsx +31 -28
- package/src/lib/TableSelectedAction/TableSelectedAction.jsx +7 -8
- package/src/pages/ConfigError.jsx +3 -1
- package/src/pages/LoginPage.jsx +72 -2
- package/src/theme/index.jsx +47 -48
- package/src/theme/overrides/components/loading-button.js +5 -5
- package/src/theme/overrides/default-props.jsx +17 -11
- package/src/widgets/Login/CognitoLogin.jsx +66 -92
- package/src/widgets/Login/DemoLogin.jsx +43 -93
- package/src/widgets/Login/styles.jsx +35 -0
- package/src/widgets/SettingsDialog.jsx +45 -19
package/src/pages/LoginPage.jsx
CHANGED
|
@@ -7,9 +7,11 @@ import config from "../config/config";
|
|
|
7
7
|
import { storage } from "@nucleoidjs/webstorage";
|
|
8
8
|
import { useEffect } from "react";
|
|
9
9
|
import { useNavigate } from "react-router-dom";
|
|
10
|
+
|
|
11
|
+
import { Box, Stack, Typography, alpha } from "@mui/material";
|
|
12
|
+
|
|
10
13
|
function LoginPage() {
|
|
11
14
|
const { name, template, credentials } = config();
|
|
12
|
-
const formColor = "#a8a9ad";
|
|
13
15
|
const navigate = useNavigate();
|
|
14
16
|
|
|
15
17
|
function token() {
|
|
@@ -32,10 +34,78 @@ function LoginPage() {
|
|
|
32
34
|
|
|
33
35
|
return (
|
|
34
36
|
<Page title={`Sign in to ${name}`}>
|
|
37
|
+
<Stack
|
|
38
|
+
spacing={0}
|
|
39
|
+
sx={{
|
|
40
|
+
mb: 4,
|
|
41
|
+
position: "relative",
|
|
42
|
+
}}
|
|
43
|
+
>
|
|
44
|
+
<Typography
|
|
45
|
+
variant="overline"
|
|
46
|
+
sx={{
|
|
47
|
+
color: "primary.main",
|
|
48
|
+
fontWeight: 700,
|
|
49
|
+
letterSpacing: "0.2em",
|
|
50
|
+
fontSize: "0.65rem",
|
|
51
|
+
mb: 1,
|
|
52
|
+
}}
|
|
53
|
+
>
|
|
54
|
+
{name}
|
|
55
|
+
</Typography>
|
|
56
|
+
|
|
57
|
+
<Typography
|
|
58
|
+
variant="h3"
|
|
59
|
+
sx={{ fontWeight: 800, lineHeight: 1.1, letterSpacing: "-0.02em" }}
|
|
60
|
+
>
|
|
61
|
+
Welcome{" "}
|
|
62
|
+
<Box
|
|
63
|
+
component="span"
|
|
64
|
+
sx={{
|
|
65
|
+
background: (theme) =>
|
|
66
|
+
`linear-gradient(135deg, ${theme.palette.primary.main}, ${theme.palette.primary.light})`,
|
|
67
|
+
backgroundClip: "text",
|
|
68
|
+
WebkitBackgroundClip: "text",
|
|
69
|
+
WebkitTextFillColor: "transparent",
|
|
70
|
+
}}
|
|
71
|
+
>
|
|
72
|
+
back.
|
|
73
|
+
</Box>
|
|
74
|
+
</Typography>
|
|
75
|
+
|
|
76
|
+
<Typography variant="body2" sx={{ color: "text.secondary", mt: 1.5 }}>
|
|
77
|
+
Enter your credentials to access the platform.
|
|
78
|
+
</Typography>
|
|
79
|
+
|
|
80
|
+
<Box
|
|
81
|
+
sx={{
|
|
82
|
+
mt: 2,
|
|
83
|
+
width: 32,
|
|
84
|
+
height: 3,
|
|
85
|
+
borderRadius: 2,
|
|
86
|
+
bgcolor: "primary.main",
|
|
87
|
+
}}
|
|
88
|
+
/>
|
|
89
|
+
</Stack>
|
|
90
|
+
|
|
35
91
|
{credentials?.provider === "COGNITO" && <CognitoLogin />}
|
|
36
92
|
{credentials?.provider === "DEMO" && <DemoLogin />}
|
|
37
93
|
|
|
38
|
-
<LoginForm icon={template.login.icon} name={name} formColor=
|
|
94
|
+
<LoginForm icon={template.login.icon} name={name} formColor="#a8a9ad" />
|
|
95
|
+
|
|
96
|
+
<Box
|
|
97
|
+
sx={{
|
|
98
|
+
mt: 4,
|
|
99
|
+
pt: 3,
|
|
100
|
+
borderTop: (theme) =>
|
|
101
|
+
`1px solid ${alpha(theme.palette.divider, 0.5)}`,
|
|
102
|
+
textAlign: "center",
|
|
103
|
+
}}
|
|
104
|
+
>
|
|
105
|
+
<Typography variant="caption" sx={{ color: "text.disabled" }}>
|
|
106
|
+
Secure · Encrypted · Private
|
|
107
|
+
</Typography>
|
|
108
|
+
</Box>
|
|
39
109
|
</Page>
|
|
40
110
|
);
|
|
41
111
|
}
|
package/src/theme/index.jsx
CHANGED
|
@@ -23,8 +23,9 @@ export default function ThemeProvider({ children }) {
|
|
|
23
23
|
const contrast = createContrast(settings.themeContrast, settings.themeMode);
|
|
24
24
|
const presets = createPresets(settings.themeColorPresets);
|
|
25
25
|
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
const theme = useMemo(() => {
|
|
27
|
+
// 1. Define the base configuration
|
|
28
|
+
const baseOptions = {
|
|
28
29
|
palette: {
|
|
29
30
|
...palette(settings.themeMode),
|
|
30
31
|
...presets.palette,
|
|
@@ -38,56 +39,54 @@ export default function ThemeProvider({ children }) {
|
|
|
38
39
|
shadows: shadows(settings.themeMode),
|
|
39
40
|
shape: { borderRadius: 8 },
|
|
40
41
|
typography,
|
|
41
|
-
}
|
|
42
|
-
[
|
|
43
|
-
settings.themeMode,
|
|
44
|
-
settings.themeDirection,
|
|
45
|
-
presets.palette,
|
|
46
|
-
presets.customShadows,
|
|
47
|
-
contrast.palette,
|
|
48
|
-
]
|
|
49
|
-
);
|
|
50
|
-
|
|
51
|
-
const theme = createTheme(memoizedValue);
|
|
52
|
-
|
|
53
|
-
theme.components = merge(componentsOverrides(theme), contrast.components, {
|
|
54
|
-
MuiCssBaseline: {
|
|
55
|
-
styleOverrides: {
|
|
56
|
-
body: {
|
|
57
|
-
scrollbarColor:
|
|
58
|
-
theme.palette.mode === "dark"
|
|
59
|
-
? `${theme.palette.grey[700]} ${theme.palette.background.default}`
|
|
60
|
-
: `${theme.palette.grey[500]} ${theme.palette.background.default}`,
|
|
61
|
-
scrollbarWidth: "thin",
|
|
62
|
-
|
|
63
|
-
"&::-webkit-scrollbar": {
|
|
64
|
-
width: 10,
|
|
65
|
-
height: 10,
|
|
66
|
-
},
|
|
42
|
+
};
|
|
67
43
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
"&::-webkit-scrollbar-thumb": {
|
|
73
|
-
backgroundColor:
|
|
74
|
-
theme.palette.mode === "dark"
|
|
75
|
-
? theme.palette.grey[700]
|
|
76
|
-
: theme.palette.grey[500],
|
|
77
|
-
borderRadius: 8,
|
|
78
|
-
border: `2px solid ${theme.palette.background.default}`,
|
|
79
|
-
},
|
|
44
|
+
// 2. Create a temporary theme instance to generate overrides
|
|
45
|
+
// (Overrides often need access to the palette/spacing of the theme)
|
|
46
|
+
const tempTheme = createTheme(baseOptions);
|
|
80
47
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
48
|
+
// 3. Merge components into the configuration
|
|
49
|
+
baseOptions.components = merge(
|
|
50
|
+
componentsOverrides(tempTheme),
|
|
51
|
+
contrast.components,
|
|
52
|
+
{
|
|
53
|
+
MuiCssBaseline: {
|
|
54
|
+
styleOverrides: {
|
|
55
|
+
body: {
|
|
56
|
+
scrollbarColor:
|
|
57
|
+
tempTheme.palette.mode === "dark"
|
|
58
|
+
? `${tempTheme.palette.grey[700]} ${tempTheme.palette.background.default}`
|
|
59
|
+
: `${tempTheme.palette.grey[500]} ${tempTheme.palette.background.default}`,
|
|
60
|
+
scrollbarWidth: "thin",
|
|
61
|
+
"&::-webkit-scrollbar": { width: 10, height: 10 },
|
|
62
|
+
"&::-webkit-scrollbar-track": {
|
|
63
|
+
backgroundColor: tempTheme.palette.background.default,
|
|
64
|
+
},
|
|
65
|
+
"&::-webkit-scrollbar-thumb": {
|
|
66
|
+
backgroundColor:
|
|
67
|
+
tempTheme.palette.mode === "dark"
|
|
68
|
+
? tempTheme.palette.grey[700]
|
|
69
|
+
: tempTheme.palette.grey[500],
|
|
70
|
+
borderRadius: 8,
|
|
71
|
+
border: `2px solid ${tempTheme.palette.background.default}`,
|
|
72
|
+
},
|
|
73
|
+
},
|
|
86
74
|
},
|
|
87
75
|
},
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
76
|
+
}
|
|
77
|
+
);
|
|
78
|
+
|
|
79
|
+
// 4. Return the final, complete theme
|
|
80
|
+
return createTheme(baseOptions);
|
|
81
|
+
}, [
|
|
82
|
+
settings.themeMode,
|
|
83
|
+
settings.themeDirection,
|
|
84
|
+
settings.themeContrast, // Added this to the dependency array
|
|
85
|
+
presets.palette,
|
|
86
|
+
presets.customShadows,
|
|
87
|
+
contrast.palette,
|
|
88
|
+
contrast.components,
|
|
89
|
+
]);
|
|
91
90
|
|
|
92
91
|
return (
|
|
93
92
|
<MuiThemeProvider theme={theme}>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { buttonClasses } from "@mui/material/Button";
|
|
2
2
|
|
|
3
3
|
// ----------------------------------------------------------------------
|
|
4
4
|
|
|
@@ -8,17 +8,17 @@ export function loadingButton(theme) {
|
|
|
8
8
|
styleOverrides: {
|
|
9
9
|
root: ({ ownerState }) => ({
|
|
10
10
|
...(ownerState.variant === "soft" && {
|
|
11
|
-
[`& .${
|
|
11
|
+
[`& .${buttonClasses.loadingIndicatorStart}`]: {
|
|
12
12
|
left: 10,
|
|
13
13
|
},
|
|
14
|
-
[`& .${
|
|
14
|
+
[`& .${buttonClasses.loadingIndicatorEnd}`]: {
|
|
15
15
|
right: 14,
|
|
16
16
|
},
|
|
17
17
|
...(ownerState.size === "small" && {
|
|
18
|
-
[`& .${
|
|
18
|
+
[`& .${buttonClasses.loadingIndicatorStart}`]: {
|
|
19
19
|
left: 10,
|
|
20
20
|
},
|
|
21
|
-
[`& .${
|
|
21
|
+
[`& .${buttonClasses.loadingIndicatorEnd}`]: {
|
|
22
22
|
right: 10,
|
|
23
23
|
},
|
|
24
24
|
}),
|
|
@@ -105,11 +105,14 @@ export function defaultProps(theme) {
|
|
|
105
105
|
},
|
|
106
106
|
MuiCardHeader: {
|
|
107
107
|
defaultProps: {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
slotProps: {
|
|
109
|
+
title: { variant: "h6" },
|
|
110
|
+
|
|
111
|
+
subheader: {
|
|
112
|
+
variant: "body2",
|
|
113
|
+
marginTop: theme.spacing(0.5),
|
|
114
|
+
}
|
|
115
|
+
}
|
|
113
116
|
},
|
|
114
117
|
},
|
|
115
118
|
MuiChip: {
|
|
@@ -134,12 +137,15 @@ export function defaultProps(theme) {
|
|
|
134
137
|
},
|
|
135
138
|
MuiListItemText: {
|
|
136
139
|
defaultProps: {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
140
|
+
slotProps: {
|
|
141
|
+
primary: {
|
|
142
|
+
typography: "subtitle2",
|
|
143
|
+
},
|
|
144
|
+
|
|
145
|
+
secondary: {
|
|
146
|
+
component: "span",
|
|
147
|
+
}
|
|
148
|
+
}
|
|
143
149
|
},
|
|
144
150
|
},
|
|
145
151
|
MuiPaper: {
|
|
@@ -15,31 +15,13 @@ import {
|
|
|
15
15
|
alpha,
|
|
16
16
|
} from "@mui/material";
|
|
17
17
|
import {
|
|
18
|
-
CheckOutlined,
|
|
19
|
-
EmailOutlined,
|
|
20
18
|
LockOutlined,
|
|
21
19
|
MarkEmailReadOutlined,
|
|
22
20
|
Visibility,
|
|
23
21
|
VisibilityOff,
|
|
24
22
|
} from "@mui/icons-material";
|
|
25
23
|
import { confirmSignup, getTokens, login, signup } from "./amplifyAuth";
|
|
26
|
-
|
|
27
|
-
const inputSx = {
|
|
28
|
-
"& .MuiOutlinedInput-root": {
|
|
29
|
-
fontSize: "1rem",
|
|
30
|
-
"& input": { py: 1.5 },
|
|
31
|
-
"&:hover fieldset": { borderColor: "primary.main" },
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const primaryButtonSx = {
|
|
36
|
-
py: 1.5,
|
|
37
|
-
fontSize: "1rem",
|
|
38
|
-
fontWeight: 600,
|
|
39
|
-
textTransform: "none",
|
|
40
|
-
borderRadius: 1.5,
|
|
41
|
-
"&:active": { transform: "translateY(0px)" },
|
|
42
|
-
};
|
|
24
|
+
import { inputSx, primaryButtonSx } from "./styles";
|
|
43
25
|
|
|
44
26
|
export default function CognitoLogin() {
|
|
45
27
|
const [mode, setMode] = useState("login");
|
|
@@ -159,124 +141,107 @@ export default function CognitoLogin() {
|
|
|
159
141
|
|
|
160
142
|
return (
|
|
161
143
|
<Stack spacing={3} sx={{ mb: 2 }}>
|
|
162
|
-
<Box sx={{
|
|
144
|
+
<Box sx={{ display: "flex", alignItems: "center", gap: 1.5 }}>
|
|
163
145
|
<Box
|
|
164
146
|
sx={{
|
|
165
|
-
width:
|
|
166
|
-
height:
|
|
167
|
-
borderRadius:
|
|
147
|
+
width: 40,
|
|
148
|
+
height: 40,
|
|
149
|
+
borderRadius: 1.5,
|
|
168
150
|
display: "inline-flex",
|
|
169
151
|
alignItems: "center",
|
|
170
152
|
justifyContent: "center",
|
|
171
|
-
|
|
153
|
+
flexShrink: 0,
|
|
172
154
|
bgcolor: (theme) => alpha(theme.palette.primary.main, 0.1),
|
|
173
155
|
color: "primary.main",
|
|
174
156
|
}}
|
|
175
157
|
>
|
|
176
158
|
{mode === "confirm" ? (
|
|
177
|
-
<MarkEmailReadOutlined sx={{ fontSize:
|
|
159
|
+
<MarkEmailReadOutlined sx={{ fontSize: 22 }} />
|
|
178
160
|
) : (
|
|
179
|
-
<LockOutlined sx={{ fontSize:
|
|
161
|
+
<LockOutlined sx={{ fontSize: 22 }} />
|
|
180
162
|
)}
|
|
181
163
|
</Box>
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
164
|
+
<Box>
|
|
165
|
+
<Typography variant="h6" sx={{ fontWeight: 700, lineHeight: 1.2 }}>
|
|
166
|
+
{titles[mode].heading}
|
|
167
|
+
</Typography>
|
|
168
|
+
<Typography variant="caption" sx={{ color: "text.secondary" }}>
|
|
169
|
+
{titles[mode].sub}
|
|
170
|
+
</Typography>
|
|
171
|
+
</Box>
|
|
189
172
|
</Box>
|
|
190
|
-
|
|
191
|
-
<Stack spacing={2}>
|
|
173
|
+
<Stack spacing={1.5}>
|
|
192
174
|
<TextField
|
|
175
|
+
variant="filled"
|
|
193
176
|
label="Email"
|
|
194
177
|
value={email}
|
|
195
178
|
onChange={(e) => setEmail(e.target.value)}
|
|
196
179
|
fullWidth
|
|
197
|
-
InputProps={{
|
|
198
|
-
startAdornment: (
|
|
199
|
-
<InputAdornment position="start">
|
|
200
|
-
<EmailOutlined sx={{ color: "text.secondary", fontSize: 22 }} />
|
|
201
|
-
</InputAdornment>
|
|
202
|
-
),
|
|
203
|
-
}}
|
|
204
180
|
sx={inputSx}
|
|
181
|
+
slotProps={{ input: { disableUnderline: true } }}
|
|
205
182
|
/>
|
|
206
183
|
|
|
207
184
|
{mode !== "confirm" && (
|
|
208
185
|
<TextField
|
|
186
|
+
variant="filled"
|
|
209
187
|
type={showPassword ? "text" : "password"}
|
|
210
188
|
label="Password"
|
|
211
189
|
value={password}
|
|
212
190
|
onChange={(e) => setPassword(e.target.value)}
|
|
213
191
|
fullWidth
|
|
214
|
-
InputProps={{
|
|
215
|
-
startAdornment: (
|
|
216
|
-
<InputAdornment position="start">
|
|
217
|
-
<LockOutlined
|
|
218
|
-
sx={{ color: "text.secondary", fontSize: 22 }}
|
|
219
|
-
/>
|
|
220
|
-
</InputAdornment>
|
|
221
|
-
),
|
|
222
|
-
endAdornment: passwordAdornment,
|
|
223
|
-
}}
|
|
224
192
|
sx={inputSx}
|
|
193
|
+
slotProps={{
|
|
194
|
+
input: {
|
|
195
|
+
disableUnderline: true,
|
|
196
|
+
endAdornment: passwordAdornment,
|
|
197
|
+
},
|
|
198
|
+
}}
|
|
225
199
|
/>
|
|
226
200
|
)}
|
|
227
201
|
|
|
228
202
|
{mode === "signup" && (
|
|
229
203
|
<TextField
|
|
204
|
+
variant="filled"
|
|
230
205
|
type={showConfirmPassword ? "text" : "password"}
|
|
231
206
|
label="Confirm Password"
|
|
232
207
|
value={confirmPassword}
|
|
233
208
|
onChange={(e) => setConfirmPassword(e.target.value)}
|
|
234
209
|
fullWidth
|
|
235
|
-
InputProps={{
|
|
236
|
-
startAdornment: (
|
|
237
|
-
<InputAdornment position="start">
|
|
238
|
-
<LockOutlined
|
|
239
|
-
sx={{ color: "text.secondary", fontSize: 22 }}
|
|
240
|
-
/>
|
|
241
|
-
</InputAdornment>
|
|
242
|
-
),
|
|
243
|
-
endAdornment: (
|
|
244
|
-
<InputAdornment position="end">
|
|
245
|
-
<IconButton
|
|
246
|
-
onClick={() => setShowConfirmPassword(!showConfirmPassword)}
|
|
247
|
-
edge="end"
|
|
248
|
-
size="small"
|
|
249
|
-
tabIndex={-1}
|
|
250
|
-
>
|
|
251
|
-
{showConfirmPassword ? <VisibilityOff /> : <Visibility />}
|
|
252
|
-
</IconButton>
|
|
253
|
-
</InputAdornment>
|
|
254
|
-
),
|
|
255
|
-
}}
|
|
256
210
|
sx={inputSx}
|
|
211
|
+
slotProps={{
|
|
212
|
+
input: {
|
|
213
|
+
disableUnderline: true,
|
|
214
|
+
endAdornment: (
|
|
215
|
+
<InputAdornment position="end">
|
|
216
|
+
<IconButton
|
|
217
|
+
onClick={() =>
|
|
218
|
+
setShowConfirmPassword(!showConfirmPassword)
|
|
219
|
+
}
|
|
220
|
+
edge="end"
|
|
221
|
+
size="small"
|
|
222
|
+
tabIndex={-1}
|
|
223
|
+
>
|
|
224
|
+
{showConfirmPassword ? <VisibilityOff /> : <Visibility />}
|
|
225
|
+
</IconButton>
|
|
226
|
+
</InputAdornment>
|
|
227
|
+
),
|
|
228
|
+
},
|
|
229
|
+
}}
|
|
257
230
|
/>
|
|
258
231
|
)}
|
|
259
232
|
|
|
260
233
|
{mode === "confirm" && (
|
|
261
234
|
<TextField
|
|
235
|
+
variant="filled"
|
|
262
236
|
label="Confirmation Code"
|
|
263
237
|
value={code}
|
|
264
238
|
onChange={(e) => setCode(e.target.value)}
|
|
265
239
|
fullWidth
|
|
266
|
-
InputProps={{
|
|
267
|
-
startAdornment: (
|
|
268
|
-
<InputAdornment position="start">
|
|
269
|
-
<CheckOutlined
|
|
270
|
-
sx={{ color: "text.secondary", fontSize: 22 }}
|
|
271
|
-
/>
|
|
272
|
-
</InputAdornment>
|
|
273
|
-
),
|
|
274
|
-
}}
|
|
275
240
|
sx={inputSx}
|
|
241
|
+
slotProps={{ input: { disableUnderline: true } }}
|
|
276
242
|
/>
|
|
277
243
|
)}
|
|
278
244
|
</Stack>
|
|
279
|
-
|
|
280
245
|
{mode === "login" && (
|
|
281
246
|
<Stack spacing={1.5}>
|
|
282
247
|
<Button
|
|
@@ -284,20 +249,24 @@ export default function CognitoLogin() {
|
|
|
284
249
|
onClick={handleLogin}
|
|
285
250
|
size="large"
|
|
286
251
|
fullWidth
|
|
252
|
+
disableElevation
|
|
287
253
|
sx={primaryButtonSx}
|
|
288
254
|
>
|
|
289
|
-
Sign in
|
|
255
|
+
Sign in →
|
|
290
256
|
</Button>
|
|
291
257
|
<Button
|
|
292
258
|
onClick={() => setMode("signup")}
|
|
293
259
|
fullWidth
|
|
294
|
-
sx={{
|
|
260
|
+
sx={{
|
|
261
|
+
textTransform: "none",
|
|
262
|
+
fontWeight: 600,
|
|
263
|
+
color: "text.secondary",
|
|
264
|
+
}}
|
|
295
265
|
>
|
|
296
|
-
Create
|
|
266
|
+
No account? Create one
|
|
297
267
|
</Button>
|
|
298
268
|
</Stack>
|
|
299
269
|
)}
|
|
300
|
-
|
|
301
270
|
{mode === "signup" && (
|
|
302
271
|
<Stack spacing={1.5}>
|
|
303
272
|
<Button
|
|
@@ -305,29 +274,34 @@ export default function CognitoLogin() {
|
|
|
305
274
|
onClick={handleSignup}
|
|
306
275
|
size="large"
|
|
307
276
|
fullWidth
|
|
277
|
+
disableElevation
|
|
308
278
|
sx={primaryButtonSx}
|
|
309
279
|
>
|
|
310
|
-
|
|
280
|
+
Create account →
|
|
311
281
|
</Button>
|
|
312
282
|
<Button
|
|
313
283
|
onClick={() => setMode("login")}
|
|
314
284
|
fullWidth
|
|
315
|
-
sx={{
|
|
285
|
+
sx={{
|
|
286
|
+
textTransform: "none",
|
|
287
|
+
fontWeight: 600,
|
|
288
|
+
color: "text.secondary",
|
|
289
|
+
}}
|
|
316
290
|
>
|
|
317
|
-
Back to
|
|
291
|
+
← Back to sign in
|
|
318
292
|
</Button>
|
|
319
293
|
</Stack>
|
|
320
294
|
)}
|
|
321
|
-
|
|
322
295
|
{mode === "confirm" && (
|
|
323
296
|
<Button
|
|
324
297
|
variant="contained"
|
|
325
298
|
onClick={handleConfirm}
|
|
326
299
|
size="large"
|
|
327
300
|
fullWidth
|
|
301
|
+
disableElevation
|
|
328
302
|
sx={primaryButtonSx}
|
|
329
303
|
>
|
|
330
|
-
|
|
304
|
+
Verify →
|
|
331
305
|
</Button>
|
|
332
306
|
)}
|
|
333
307
|
</Stack>
|