-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Get initial page setup and fix some eslints * Finish majority of UI styling * Finished clipboard button * refactor page component * Add prettier to project * Format project with prettier * Add format command * rename files * Add icons and lines * WIP event details table * Run prettier on codbase 😭 * Add finishing touches for latest mock ups * Fix frontend lint error * Update Request type to use rule action types * Fix typing issue * Fix lint issues * Fix last lint issue 🤞 * Update changelog * Run prettier formatter * Remove unused clipboard icon * Remove comment * Remove ts-ignore * Fix changelog file
- Loading branch information
1 parent
4f3a60e
commit 554a214
Showing
43 changed files
with
1,141 additions
and
500 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.idea/ | ||
.next/ | ||
node_modules/ |
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,7 @@ | ||
{ | ||
"trailingComma": "es5", | ||
"tabWidth": 2, | ||
"semi": true, | ||
"singleQuote": true, | ||
"jsxSingleQuote": true | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import { Icon, Tooltip, useClipboard } from '@fidesui/react'; | ||
import React, { useState } from 'react'; | ||
|
||
enum TooltipText { | ||
COPY = 'Copy', | ||
COPIED = 'Copied', | ||
} | ||
|
||
const useClipboardButton = (requestId: string) => { | ||
const { onCopy } = useClipboard(requestId); | ||
|
||
const [highlighted, setHighlighted] = useState(false); | ||
const [tooltipText, setTooltipText] = useState(TooltipText.COPY); | ||
|
||
const handleMouseDown = () => { | ||
setTooltipText(TooltipText.COPIED); | ||
onCopy(); | ||
}; | ||
const handleMouseUp = () => { | ||
setHighlighted(false); | ||
}; | ||
|
||
const handleMouseEnter = () => { | ||
setHighlighted(true); | ||
}; | ||
const handleMouseLeave = () => { | ||
setHighlighted(false); | ||
}; | ||
|
||
return { | ||
tooltipText, | ||
highlighted, | ||
handleMouseDown, | ||
handleMouseUp, | ||
handleMouseEnter, | ||
handleMouseLeave, | ||
setTooltipText, | ||
}; | ||
}; | ||
|
||
type ClipboardButtonProps = { | ||
requestId: string; | ||
}; | ||
|
||
const ClipboardButton = ({ requestId }: ClipboardButtonProps) => { | ||
const { | ||
tooltipText, | ||
highlighted, | ||
handleMouseDown, | ||
handleMouseUp, | ||
handleMouseEnter, | ||
handleMouseLeave, | ||
setTooltipText, | ||
} = useClipboardButton(requestId); | ||
|
||
const iconColor = !highlighted ? 'gray.600' : 'complimentary.500'; | ||
|
||
return ( | ||
<Tooltip | ||
label={tooltipText} | ||
placement='top' | ||
closeDelay={500} | ||
onOpen={() => { | ||
setTooltipText(TooltipText.COPY); | ||
}} | ||
onClose={() => { | ||
setTooltipText(TooltipText.COPY); | ||
}} | ||
> | ||
<Icon | ||
cursor='pointer' | ||
width={18} | ||
height={18} | ||
viewBox='0 0 18 18' | ||
color={iconColor} | ||
onClick={handleMouseDown} | ||
onMouseUp={handleMouseUp} | ||
onMouseEnter={handleMouseEnter} | ||
onMouseLeave={handleMouseLeave} | ||
> | ||
<path | ||
fill='currentColor' | ||
d='M13.7045 2.25H11.8677C11.417 0.942187 10.217 0 8.79545 0C7.37386 0 6.17386 0.942187 5.72386 2.25H3.88636C2.98295 2.25 2.25 3.00516 2.25 3.9375V16.3125C2.25 17.2441 2.98295 18 3.88636 18H13.7045C14.608 18 15.3409 17.2448 15.3409 16.3125V3.9375C15.3409 3.00516 14.608 2.25 13.7045 2.25ZM8.79545 2.25C9.39784 2.25 9.88636 2.75379 9.88636 3.375C9.88636 3.99621 9.39784 4.5 8.79545 4.5C8.19307 4.5 7.70455 3.99727 7.70455 3.375C7.70455 2.75379 8.19205 2.25 8.79545 2.25ZM11.5227 7.875H6.06818C5.76818 7.875 5.52273 7.62188 5.52273 7.3125C5.52273 7.00312 5.76818 6.75 6.06818 6.75H11.5227C11.8227 6.75 12.0682 7.00312 12.0682 7.3125C12.0682 7.62188 11.8227 7.875 11.5227 7.875' | ||
/> | ||
</Icon> | ||
</Tooltip> | ||
); | ||
}; | ||
|
||
export default ClipboardButton; |
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
16 changes: 16 additions & 0 deletions
16
clients/admin-ui/src/features/common/Icon/GreenCheckCircle.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,16 @@ | ||
import { createIcon } from '@chakra-ui/react'; | ||
|
||
export default createIcon({ | ||
displayName: 'GreenCheckCircle', | ||
viewBox: '0 0 16 16', | ||
defaultProps: { | ||
width: '16px', | ||
height: '16px', | ||
}, | ||
path: ( | ||
<path | ||
fill='#38A169' | ||
d='M7.00065 13.6663C3.31865 13.6663 0.333984 10.6817 0.333984 6.99967C0.333984 3.31767 3.31865 0.333008 7.00065 0.333008C10.6827 0.333008 13.6673 3.31767 13.6673 6.99967C13.6673 10.6817 10.6827 13.6663 7.00065 13.6663ZM6.33598 9.66634L11.0493 4.95234L10.1067 4.00967L6.33598 7.78101L4.44998 5.89501L3.50732 6.83767L6.33598 9.66634Z' | ||
/> | ||
), | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import React from 'react'; | ||
|
||
import { useObscuredPII } from '../privacy-requests/helpers'; | ||
|
||
const PII: React.FC<{ data: string }> = ({ data }) => ( | ||
<>{useObscuredPII(data)}</> | ||
); | ||
|
||
export default PII; |
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
Oops, something went wrong.