-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement create password functionality
- Loading branch information
Showing
19 changed files
with
542 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions
34
frontend/src/components/common/responsive/ResponsiveAuthContainer.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { Box, Flex } from "@chakra-ui/react"; | ||
import React from "react"; | ||
|
||
interface ResponsiveAuthContainerProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
const ResponsiveAuthContainer = ({ | ||
children, | ||
}: ResponsiveAuthContainerProps): React.ReactElement => { | ||
return ( | ||
<Flex | ||
padding={{ | ||
base: "2.25rem", | ||
md: "2.5rem", | ||
}} | ||
background="var(--gray-100, #EDF2F7)" | ||
borderRadius="0.375rem" | ||
justifyContent="center" | ||
> | ||
<Box | ||
display="inline-flex" | ||
flexDirection="column" | ||
gap={{ base: "1.12rem", md: "1rem" }} | ||
width={{ md: "16rem" }} | ||
justifyContent="center" | ||
> | ||
{children} | ||
</Box> | ||
</Flex> | ||
); | ||
}; | ||
|
||
export default ResponsiveAuthContainer; |
24 changes: 24 additions & 0 deletions
24
frontend/src/components/common/responsive/ResponsiveAuthPageLogo.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import React from "react"; | ||
import { Center, Image } from "@chakra-ui/react"; | ||
|
||
const ResponsiveLogo = (): React.ReactElement => { | ||
return ( | ||
<Center | ||
height={{ base: "8rem", md: "10.85rem" }} | ||
aspectRatio="27.3/14" | ||
bg="#2C5282" | ||
borderRadius="2.6875rem" | ||
border="1px solid var(--gray-200, #E2E8F0)" | ||
> | ||
<Image | ||
src="/images/humane_society_logo_text.png" | ||
alt="Humane Society Logo" | ||
height={{ base: "6.5rem", md: "9rem" }} | ||
aspectRatio="27.3/14" | ||
objectFit="cover" | ||
/> | ||
</Center> | ||
); | ||
}; | ||
|
||
export default ResponsiveLogo; |
36 changes: 36 additions & 0 deletions
36
frontend/src/components/common/responsive/ResponsiveModalWindow.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import React from "react"; | ||
import { Center, Flex } from "@chakra-ui/react"; | ||
|
||
interface ResponsiveModalWindowProps { | ||
children: React.ReactNode; // Define children prop type | ||
} | ||
|
||
const ResponsiveModalWindow = ({ | ||
children, | ||
}: ResponsiveModalWindowProps): React.ReactElement => { | ||
return ( | ||
<Center | ||
top="0" | ||
left="0" | ||
position="absolute" | ||
height="100%" | ||
width="100%" | ||
bg="rgba(26, 32, 44, 0.60)" | ||
> | ||
<Flex | ||
bg="var(--gray-50, #F7FAFC)" | ||
align-items="center" | ||
width={{ base: "90%", sm: "21.375rem", md: "33.625rem" }} | ||
direction="column" | ||
gap={{ base: "1rem", md: "2.8125rem" }} | ||
maxWidth={{ base: "21.375rem", md: "none" }} | ||
padding={{ base: "1.38rem 2.38rem", md: "3.6875rem 10.5rem" }} | ||
borderRadius="0.375rem" | ||
> | ||
{children} | ||
</Flex> | ||
</Center> | ||
); | ||
}; | ||
|
||
export default ResponsiveModalWindow; |
58 changes: 58 additions & 0 deletions
58
frontend/src/components/common/responsive/ResponsivePasswordInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import React from "react"; | ||
import { | ||
IconButton, | ||
Input, | ||
InputGroup, | ||
InputRightElement, | ||
} from "@chakra-ui/react"; | ||
import { ViewIcon, ViewOffIcon } from "@chakra-ui/icons"; | ||
|
||
interface ResponsivePasswordInputProps { | ||
value: string; | ||
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void; | ||
} | ||
|
||
const ResponsivePasswordInput = ({ | ||
value, | ||
onChange, | ||
}: ResponsivePasswordInputProps): React.ReactElement => { | ||
const [showPassword, setShowPassword] = React.useState(false); | ||
const handlePasswordClick = () => setShowPassword(!showPassword); | ||
|
||
return ( | ||
<InputGroup size="md"> | ||
<Input | ||
fontSize="14px" | ||
height="2.4rem" | ||
pr="2rem" | ||
type={showPassword ? "text" : "password"} | ||
bg="#FFFFFF" | ||
value={value} | ||
onChange={onChange} | ||
/> | ||
<InputRightElement width="2rem"> | ||
{showPassword ? ( | ||
<IconButton | ||
variant="unstyled" | ||
isRound | ||
bg="transparent" | ||
onClick={handlePasswordClick} | ||
aria-label="view" | ||
icon={<ViewIcon />} | ||
/> | ||
) : ( | ||
<IconButton | ||
variant="unstyled" | ||
isRound | ||
bg="transparent" | ||
onClick={handlePasswordClick} | ||
aria-label="hide" | ||
icon={<ViewOffIcon />} | ||
/> | ||
)} | ||
</InputRightElement> | ||
</InputGroup> | ||
); | ||
}; | ||
|
||
export default ResponsivePasswordInput; |
46 changes: 46 additions & 0 deletions
46
frontend/src/components/common/responsive/ResponsivePawprintBackground.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// NOT CURRENTLY BEING USED IN PROD | ||
// USED IN CASE YOU NEED TO ROTATE A BACKGROUND IMAGE | ||
import React from "react"; | ||
import { Box, Flex } from "@chakra-ui/react"; | ||
|
||
const ResponsivePawprintBackground = (): React.ReactElement => { | ||
return ( | ||
<Flex | ||
position="absolute" | ||
top="0" | ||
left="0" | ||
width="100vw" | ||
height="100%" | ||
overflow="hidden" | ||
pointerEvents="none" | ||
> | ||
<Box | ||
position="absolute" | ||
top="50%" | ||
left="50%" | ||
sx={{ | ||
backgroundImage: "url('/images/pawprint_background.png')", | ||
backgroundRepeat: "no-repeat", | ||
backgroundColor: "var(--blue-700, #2C5282)", | ||
backgroundPosition: "center", | ||
zIndex: -1, | ||
|
||
"@media (orientation: portrait)": { | ||
transform: "translate(-50%, -50%) rotate(-15deg)", | ||
backgroundSize: "contain", | ||
width: "200vw", | ||
height: "200vh", | ||
}, | ||
"@media (orientation: landscape)": { | ||
transform: "translate(-50%, -50%)", | ||
backgroundSize: "130%", | ||
width: "100%", | ||
height: "100%", | ||
}, | ||
}} | ||
/> | ||
</Flex> | ||
); | ||
}; | ||
|
||
export default ResponsivePawprintBackground; |
Oops, something went wrong.