diff --git a/source/frontend/src/components/common/EditButton.tsx b/source/frontend/src/components/common/EditButton.tsx deleted file mode 100644 index 78806d91b9..0000000000 --- a/source/frontend/src/components/common/EditButton.tsx +++ /dev/null @@ -1,29 +0,0 @@ -import { Button } from 'react-bootstrap'; -import { FaEdit } from 'react-icons/fa'; - -interface IEditButtonProps { - onClick: () => void; - title?: string; - icon?: React.ReactNode; - dataTestId?: string | null; -} - -export const EditButton: React.FunctionComponent> = ({ - onClick, - title, - icon, - dataTestId, -}) => { - return ( - - ); -}; - -export default EditButton; diff --git a/source/frontend/src/components/common/Section/Section.tsx b/source/frontend/src/components/common/Section/Section.tsx index 5d0e7b2dbc..88c56f97c6 100644 --- a/source/frontend/src/components/common/Section/Section.tsx +++ b/source/frontend/src/components/common/Section/Section.tsx @@ -42,7 +42,7 @@ export const Section: React.FC< {header} {isCollapsable && ( - + {isCollapsed && ( props.theme.css.primary}; - text-align: right; + overflow: hidden; `; export const StyledSubtleText = styled.p` diff --git a/source/frontend/src/components/common/buttons/EditButton.tsx b/source/frontend/src/components/common/buttons/EditButton.tsx new file mode 100644 index 0000000000..b018c5bdf8 --- /dev/null +++ b/source/frontend/src/components/common/buttons/EditButton.tsx @@ -0,0 +1,30 @@ +import { FaEdit } from 'react-icons/fa'; +import { CSSProperties } from 'styled-components'; + +import { StyledIconButton } from './IconButton'; + +interface IEditButtonProps { + onClick: () => void; + title?: string; + icon?: React.ReactNode; + 'data-testId'?: string; + style?: CSSProperties | null; +} + +export const EditButton: React.FunctionComponent< + React.PropsWithChildren +> = props => { + return ( + + {props.icon ?? } + + ); +}; + +export default EditButton; diff --git a/source/frontend/src/components/common/buttons/EditPropertiesButton.tsx b/source/frontend/src/components/common/buttons/EditPropertiesButton.tsx index 5da4943eb4..e9e8f8a7eb 100644 --- a/source/frontend/src/components/common/buttons/EditPropertiesButton.tsx +++ b/source/frontend/src/components/common/buttons/EditPropertiesButton.tsx @@ -7,8 +7,8 @@ export const EditPropertiesIcon: React.FC = () => { }; const EditMapMarkerButton = styled(EditMapMarkerIcon)` - fill: ${props => props.theme.css.iconBlueAction}; + fill: ${props => props.theme.bcTokens.surfaceColorPrimaryButtonDefault}; &:hover { - fill: ${props => props.theme.css.iconBlueHover}; + fill: ${props => props.theme.bcTokens.surfaceColorPrimaryButtonHover}; } `; diff --git a/source/frontend/src/components/common/buttons/RemoveButton.tsx b/source/frontend/src/components/common/buttons/RemoveButton.tsx index 22df0ce57e..8072e89a6e 100644 --- a/source/frontend/src/components/common/buttons/RemoveButton.tsx +++ b/source/frontend/src/components/common/buttons/RemoveButton.tsx @@ -1,31 +1,49 @@ -import React from 'react'; +import React, { CSSProperties } from 'react'; +import { ButtonProps } from 'react-bootstrap'; +import { FaTrash } from 'react-icons/fa'; import { MdClose } from 'react-icons/md'; import styled, { css } from 'styled-components'; import { StyledIconButton } from './IconButton'; import { LinkButton } from './LinkButton'; -interface IRemoveButtonProps { +interface IRemoveButtonProps extends ButtonProps { label?: string; - dataTestId?: string | null; + title?: string; + 'data-testId'?: string; fontSize?: string; + icon?: React.ReactNode; + style?: CSSProperties | null; onRemove: () => void; } -export const RemoveButton: React.FunctionComponent> = ({ - label, - dataTestId, - fontSize, - onRemove, -}) => { +export const RemoveButton: React.FunctionComponent< + React.PropsWithChildren +> = props => { return ( - - {' '} - {label ?? 'Remove'} + + {' '} + {props.label ?? 'Remove'} ); }; +export const RemoveIconButton: React.FunctionComponent< + React.PropsWithChildren +> = props => { + return ( + + {props.icon ?? } + + ); +}; + // Support font-size override for remove buttons export const StyledRemoveLinkButton = styled(LinkButton)<{ $fontSize?: string }>` &&.btn { @@ -60,20 +78,19 @@ export const StyledRemoveIconButton = styled(StyledIconButton)` &&.btn { &.btn-primary { svg { - color: ${({ theme }) => theme.bcTokens.iconsColorDisabled}; + color: #aaaaaa !important; } text-decoration: none; line-height: unset; .text { display: none; } - &:hover, - &:active, - &:focus { - color: #d8292f; + svg:hover, + svg:active, + svg:focus { + color: #d8292f !important; text-decoration: none; opacity: unset; - display: flex; flex-direction: row; .text { display: inline; diff --git a/source/frontend/src/components/common/buttons/ViewButton.tsx b/source/frontend/src/components/common/buttons/ViewButton.tsx new file mode 100644 index 0000000000..8787c895ff --- /dev/null +++ b/source/frontend/src/components/common/buttons/ViewButton.tsx @@ -0,0 +1,29 @@ +import { ButtonProps } from 'react-bootstrap/Button'; +import { FaEye } from 'react-icons/fa'; +import { CSSProperties } from 'styled-components'; + +import { StyledIconButton } from './IconButton'; + +interface IViewButtonProps extends ButtonProps { + onClick: () => void; + title?: string; + icon?: React.ReactNode; + 'data-testId'?: string; + style?: CSSProperties | null; +} + +export const ViewButton: React.FunctionComponent< + React.PropsWithChildren +> = props => ( + + {props.icon ?? } + +); + +export default ViewButton; diff --git a/source/frontend/src/components/common/form/NotesModal.tsx b/source/frontend/src/components/common/form/NotesModal.tsx index c02acd7d90..b45e0843aa 100644 --- a/source/frontend/src/components/common/form/NotesModal.tsx +++ b/source/frontend/src/components/common/form/NotesModal.tsx @@ -1,7 +1,7 @@ import { Formik } from 'formik'; import { ReactNode } from 'react'; import React from 'react'; -import { FaRegFileAlt } from 'react-icons/fa'; +import { FaEye } from 'react-icons/fa'; import * as Yup from 'yup'; import { StyledIconButton } from '@/components/common/buttons'; @@ -70,7 +70,7 @@ export const NotesModal = ({ setDisplayModal(true); }} > - + ); }; diff --git a/source/frontend/src/components/common/form/ToggleSaveInput/ToggleSaveInputView.tsx b/source/frontend/src/components/common/form/ToggleSaveInput/ToggleSaveInputView.tsx index 996b137286..d1e149516a 100644 --- a/source/frontend/src/components/common/form/ToggleSaveInput/ToggleSaveInputView.tsx +++ b/source/frontend/src/components/common/form/ToggleSaveInput/ToggleSaveInputView.tsx @@ -2,10 +2,11 @@ import React from 'react'; import { Button, Form, Spinner } from 'react-bootstrap'; import { FaCheck } from 'react-icons/fa'; import NumberFormat from 'react-number-format'; +import styled from 'styled-components'; import { formatMoney } from '@/utils'; -import EditButton from '../../EditButton'; +import EditButton from '../../buttons/EditButton'; /** * Non formik form that allows a user to toggle between a value and an input and save the input. @@ -65,9 +66,20 @@ export const ToggleSaveInputView: React.FC = ({ } else { return ( <> - {asCurrency ? formatMoney(Number(value)) : value} - setIsEditing(true)} /> + + {asCurrency ? formatMoney(Number(value)) : value} + setIsEditing(true)} /> + ); } }; + +export const StyledToggleContainer = styled.div` + display: flex; + flex-direction: row; + justify-content: flex-end; + align-items: center; + margin-bottom: 0.5rem; + align-items: center; +`; diff --git a/source/frontend/src/components/common/form/ToggleSaveInput/__snapshots__/ToggleSaveInputView.test.tsx.snap b/source/frontend/src/components/common/form/ToggleSaveInput/__snapshots__/ToggleSaveInputView.test.tsx.snap index dd7225285f..8ff61aa60f 100644 --- a/source/frontend/src/components/common/form/ToggleSaveInput/__snapshots__/ToggleSaveInputView.test.tsx.snap +++ b/source/frontend/src/components/common/form/ToggleSaveInput/__snapshots__/ToggleSaveInputView.test.tsx.snap @@ -6,25 +6,311 @@ exports[`TogleSaveInputView component > renders as expected 1`] = ` class="Toastify" />
- +
+ + + +
+ +
`; diff --git a/source/frontend/src/components/common/form/__snapshots__/NotesModal.test.tsx.snap b/source/frontend/src/components/common/form/__snapshots__/NotesModal.test.tsx.snap index 8e65c118d1..3e29c69f89 100644 --- a/source/frontend/src/components/common/form/__snapshots__/NotesModal.test.tsx.snap +++ b/source/frontend/src/components/common/form/__snapshots__/NotesModal.test.tsx.snap @@ -271,15 +271,15 @@ exports[`NotesModal component > renders as expected 1`] = ` > diff --git a/source/frontend/src/components/contact/ContactManagerView/ContactResultComponent/__snapshots__/ContactResultComponent.test.tsx.snap b/source/frontend/src/components/contact/ContactManagerView/ContactResultComponent/__snapshots__/ContactResultComponent.test.tsx.snap index cfa8dd2dd0..0e8e8e59c8 100644 --- a/source/frontend/src/components/contact/ContactManagerView/ContactResultComponent/__snapshots__/ContactResultComponent.test.tsx.snap +++ b/source/frontend/src/components/contact/ContactManagerView/ContactResultComponent/__snapshots__/ContactResultComponent.test.tsx.snap @@ -811,7 +811,8 @@ exports[`Contact Search Results Table > matches snapshot 1`] = ` class="c5 c6" > + onEdit(original)} /> )} {hasClaim(Claims.LEASE_EDIT) && ( - + original.id && onDelete(original)} + /> )} ); diff --git a/source/frontend/src/features/leases/detail/LeasePages/payment/table/periods/__snapshots__/PaymentPeriodsView.test.tsx.snap b/source/frontend/src/features/leases/detail/LeasePages/payment/table/periods/__snapshots__/PaymentPeriodsView.test.tsx.snap index fffaa70b5d..3ad4038bce 100644 --- a/source/frontend/src/features/leases/detail/LeasePages/payment/table/periods/__snapshots__/PaymentPeriodsView.test.tsx.snap +++ b/source/frontend/src/features/leases/detail/LeasePages/payment/table/periods/__snapshots__/PaymentPeriodsView.test.tsx.snap @@ -822,6 +822,86 @@ exports[`PeriodsForm component > renders with data as expected 1`] = ` margin-right: 0; } +.c8.c8.btn { + background-color: unset; + border: none; +} + +.c8.c8.btn:hover, +.c8.c8.btn:focus, +.c8.c8.btn:active { + background-color: unset; + outline: none; + box-shadow: none; +} + +.c8.c8.btn svg { + -webkit-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} + +.c8.c8.btn svg:hover { + -webkit-transition: all 0.3s ease-in; + transition: all 0.3s ease-in; +} + +.c8.c8.btn.btn-primary svg { + color: #013366; +} + +.c8.c8.btn.btn-primary svg:hover { + color: #013366; +} + +.c8.c8.btn.btn-light svg { + color: var(--surface-color-primary-button-default); +} + +.c8.c8.btn.btn-light svg:hover { + color: #CE3E39; +} + +.c8.c8.btn.btn-info svg { + color: var(--surface-color-primary-button-default); +} + +.c8.c8.btn.btn-info svg:hover { + color: var(--surface-color-primary-button-hover); +} + +.c9.c9.btn.btn-primary { + -webkit-text-decoration: none; + text-decoration: none; + line-height: unset; +} + +.c9.c9.btn.btn-primary svg { + color: #aaaaaa !important; +} + +.c9.c9.btn.btn-primary .text { + display: none; +} + +.c9.c9.btn.btn-primary svg:hover, +.c9.c9.btn.btn-primary svg:active, +.c9.c9.btn.btn-primary svg:focus { + color: #d8292f !important; + -webkit-text-decoration: none; + text-decoration: none; + opacity: unset; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; +} + +.c9.c9.btn.btn-primary svg:hover .text, +.c9.c9.btn.btn-primary svg:active .text, +.c9.c9.btn.btn-primary svg:focus .text { + display: inline; + line-height: 2rem; +} + .c1 { font-weight: bold; color: var(--theme-blue-100); @@ -1370,57 +1450,47 @@ exports[`PeriodsForm component > renders with data as expected 1`] = ` class="c6 c7" > + onEdit(original)} /> )} {hasClaim(Claims.LEASE_EDIT) && original.payments.length <= 0 && original.statusTypeCode?.id !== LeasePeriodStatusTypes.EXERCISED && ( - + id={`edit-period-${index}`} + onRemove={() => original.id && onDelete(original)} + /> )} {hasClaim(Claims.LEASE_EDIT) && (original.payments.length > 0 || diff --git a/source/frontend/src/features/mapSideBar/acquisition/__snapshots__/AcquisitionView.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/__snapshots__/AcquisitionView.test.tsx.snap index 436212a8bd..13c6d56f10 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/__snapshots__/AcquisitionView.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/acquisition/__snapshots__/AcquisitionView.test.tsx.snap @@ -444,6 +444,7 @@ exports[`AcquisitionView component > renders as expected 1`] = ` .c31 { text-align: right; + overflow: hidden; } .c33 { diff --git a/source/frontend/src/features/mapSideBar/acquisition/common/AcquisitionMenu.tsx b/source/frontend/src/features/mapSideBar/acquisition/common/AcquisitionMenu.tsx index e23006e54d..f7d97dad9e 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/common/AcquisitionMenu.tsx +++ b/source/frontend/src/features/mapSideBar/acquisition/common/AcquisitionMenu.tsx @@ -3,9 +3,9 @@ import { Col, Row } from 'react-bootstrap'; import { FaCaretRight } from 'react-icons/fa'; import styled from 'styled-components'; +import EditButton from '@/components/common/buttons/EditButton'; import { EditPropertiesIcon } from '@/components/common/buttons/EditPropertiesButton'; import { LinkButton } from '@/components/common/buttons/LinkButton'; -import EditButton from '@/components/common/EditButton'; import TooltipIcon from '@/components/common/TooltipIcon'; import { Claims, Roles } from '@/constants/index'; import { useKeycloakWrapper } from '@/hooks/useKeycloakWrapper'; diff --git a/source/frontend/src/features/mapSideBar/acquisition/common/__snapshots__/AcquisitionMenu.test.tsx.snap b/source/frontend/src/features/mapSideBar/acquisition/common/__snapshots__/AcquisitionMenu.test.tsx.snap index a6bee72b71..b1837d11f6 100644 --- a/source/frontend/src/features/mapSideBar/acquisition/common/__snapshots__/AcquisitionMenu.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/acquisition/common/__snapshots__/AcquisitionMenu.test.tsx.snap @@ -6,7 +6,7 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` class="Toastify" />
- .c7.btn { + .c5.btn { display: -webkit-box; display: -webkit-flex; display: -ms-flexbox; @@ -35,19 +35,19 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` cursor: pointer; } -.c7.btn .Button__value { +.c5.btn .Button__value { width: -webkit-max-content; width: -moz-max-content; width: max-content; } -.c7.btn:hover { +.c5.btn:hover { -webkit-text-decoration: underline; text-decoration: underline; opacity: 0.8; } -.c7.btn:focus { +.c5.btn:focus { outline-width: 2px; outline-style: solid; outline-color: #2E5DD7; @@ -55,31 +55,31 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` box-shadow: none; } -.c7.btn.btn-primary { +.c5.btn.btn-primary { color: #FFFFFF; background-color: #013366; } -.c7.btn.btn-primary:hover, -.c7.btn.btn-primary:active, -.c7.btn.btn-primary:focus { +.c5.btn.btn-primary:hover, +.c5.btn.btn-primary:active, +.c5.btn.btn-primary:focus { background-color: #1E5189; } -.c7.btn.btn-secondary { +.c5.btn.btn-secondary { color: #013366; background: none; border-color: #013366; } -.c7.btn.btn-secondary:hover, -.c7.btn.btn-secondary:active, -.c7.btn.btn-secondary:focus { +.c5.btn.btn-secondary:hover, +.c5.btn.btn-secondary:active, +.c5.btn.btn-secondary:focus { color: #FFFFFF; background-color: #013366; } -.c7.btn.btn-info { +.c5.btn.btn-info { color: #9F9D9C; border: none; background: none; @@ -87,66 +87,66 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` padding-right: 0.6rem; } -.c7.btn.btn-info:hover, -.c7.btn.btn-info:active, -.c7.btn.btn-info:focus { +.c5.btn.btn-info:hover, +.c5.btn.btn-info:active, +.c5.btn.btn-info:focus { color: var(--surface-color-primary-button-hover); background: none; } -.c7.btn.btn-light { +.c5.btn.btn-light { color: #FFFFFF; background-color: #606060; border: none; } -.c7.btn.btn-light:hover, -.c7.btn.btn-light:active, -.c7.btn.btn-light:focus { +.c5.btn.btn-light:hover, +.c5.btn.btn-light:active, +.c5.btn.btn-light:focus { color: #FFFFFF; background-color: #606060; } -.c7.btn.btn-dark { +.c5.btn.btn-dark { color: #FFFFFF; background-color: #474543; border: none; } -.c7.btn.btn-dark:hover, -.c7.btn.btn-dark:active, -.c7.btn.btn-dark:focus { +.c5.btn.btn-dark:hover, +.c5.btn.btn-dark:active, +.c5.btn.btn-dark:focus { color: #FFFFFF; background-color: #474543; } -.c7.btn.btn-danger { +.c5.btn.btn-danger { color: #FFFFFF; background-color: #CE3E39; } -.c7.btn.btn-danger:hover, -.c7.btn.btn-danger:active, -.c7.btn.btn-danger:focus { +.c5.btn.btn-danger:hover, +.c5.btn.btn-danger:active, +.c5.btn.btn-danger:focus { color: #FFFFFF; background-color: #CE3E39; } -.c7.btn.btn-warning { +.c5.btn.btn-warning { color: #FFFFFF; background-color: #FCBA19; border-color: #FCBA19; } -.c7.btn.btn-warning:hover, -.c7.btn.btn-warning:active, -.c7.btn.btn-warning:focus { +.c5.btn.btn-warning:hover, +.c5.btn.btn-warning:active, +.c5.btn.btn-warning:focus { color: #FFFFFF; border-color: #FCBA19; background-color: #FCBA19; } -.c7.btn.btn-link { +.c5.btn.btn-link { font-size: 1.6rem; font-weight: 400; color: var(--surface-color-primary-button-default); @@ -170,9 +170,9 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` text-decoration: underline; } -.c7.btn.btn-link:hover, -.c7.btn.btn-link:active, -.c7.btn.btn-link:focus { +.c5.btn.btn-link:hover, +.c5.btn.btn-link:active, +.c5.btn.btn-link:focus { color: var(--surface-color-primary-button-hover); -webkit-text-decoration: underline; text-decoration: underline; @@ -182,15 +182,15 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` outline: none; } -.c7.btn.btn-link:disabled, -.c7.btn.btn-link.disabled { +.c5.btn.btn-link:disabled, +.c5.btn.btn-link.disabled { color: #9F9D9C; background: none; pointer-events: none; } -.c7.btn:disabled, -.c7.btn:disabled:hover { +.c5.btn:disabled, +.c5.btn:disabled:hover { color: #9F9D9C; background-color: #EDEBE9; box-shadow: none; @@ -202,24 +202,71 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` cursor: not-allowed; } -.c7.Button .Button__icon { +.c5.Button .Button__icon { margin-right: 1.6rem; } -.c7.Button--icon-only:focus { +.c5.Button--icon-only:focus { outline: none; } -.c7.Button--icon-only .Button__icon { +.c5.Button--icon-only .Button__icon { margin-right: 0; } -.c5 { - fill: #007bff; +.c6.c6.btn { + background-color: unset; + border: none; +} + +.c6.c6.btn:hover, +.c6.c6.btn:focus, +.c6.c6.btn:active { + background-color: unset; + outline: none; + box-shadow: none; +} + +.c6.c6.btn svg { + -webkit-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} + +.c6.c6.btn svg:hover { + -webkit-transition: all 0.3s ease-in; + transition: all 0.3s ease-in; +} + +.c6.c6.btn.btn-primary svg { + color: #013366; } -.c5:hover { - fill: #0056b3; +.c6.c6.btn.btn-primary svg:hover { + color: #013366; +} + +.c6.c6.btn.btn-light svg { + color: var(--surface-color-primary-button-default); +} + +.c6.c6.btn.btn-light svg:hover { + color: #CE3E39; +} + +.c6.c6.btn.btn-info svg { + color: var(--surface-color-primary-button-default); +} + +.c6.c6.btn.btn-info svg:hover { + color: var(--surface-color-primary-button-hover); +} + +.c7 { + fill: #013366; +} + +.c7:hover { + fill: #1E5189; } .c0 { @@ -251,7 +298,7 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` font-size: 1.4rem; } -.c6 { +.c8 { background-color: #fcba19; font-size: 1.5rem; border-radius: 50%; @@ -273,7 +320,7 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` align-items: center; } -.c6.selected { +.c8.selected { background-color: #FCBA19; } @@ -326,31 +373,35 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` Properties
@@ -365,7 +416,7 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` class="pr-2 col-auto" >
1
@@ -374,7 +425,7 @@ exports[`AcquisitionMenu component > matches snapshot 1`] = ` class="col" > +
+ + + +
+ +
@@ -321,7 +607,7 @@ exports[`compensation list view > renders as expected 1`] = ` Requisitions in this file (H120)
{hasClaim(Claims.COMPENSATION_REQUISITION_VIEW) && ( - - } + cellProps.row.original.id && onShow(cellProps.row.original.id)} - > + /> )} {hasClaim(Claims.COMPENSATION_REQUISITION_DELETE) && canEditDetails(cellProps.row.original.isDraft) && ( - cellProps.row.original.id && onDelete(cellProps.row.original.id)} + data-testId={`compensation-delete-${cellProps.row.id}`} + onRemove={() => cellProps.row.original.id && onDelete(cellProps.row.original.id)} title="Delete Compensation" - > - - + /> )} {hasClaim(Claims.COMPENSATION_REQUISITION_DELETE) && !canEditDetails(cellProps.row.original.isDraft) && ( @@ -141,16 +133,6 @@ const StyledDiv = styled(InlineFlexDiv)` justify-content: space-around; width: 100%; - [id^='compensation-view'] { - color: ${props => props.theme.css.activeActionColor}; - } - [id^='compensation-delete'] { - color: ${props => props.theme.css.activeActionColor}; - :hover { - color: ${({ theme }) => theme.bcTokens.surfaceColorPrimaryDangerButtonDefault}; - } - } - .btn.btn-primary { background-color: transparent; padding: 0; diff --git a/source/frontend/src/features/mapSideBar/compensation/update/__snapshots__/UpdateCompensationRequisitionForm.test.tsx.snap b/source/frontend/src/features/mapSideBar/compensation/update/__snapshots__/UpdateCompensationRequisitionForm.test.tsx.snap index d015c2f5d9..086c53fd10 100644 --- a/source/frontend/src/features/mapSideBar/compensation/update/__snapshots__/UpdateCompensationRequisitionForm.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/compensation/update/__snapshots__/UpdateCompensationRequisitionForm.test.tsx.snap @@ -1217,7 +1217,7 @@ exports[`Compensation Requisition UpdateForm component > renders as expected 1`] Payment
renders as expected 1`] Activities
- { + { setRowToDelete(index); setShowModal(true); }} - > - - + /> diff --git a/source/frontend/src/features/mapSideBar/disposition/__snapshots__/DispositionView.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/__snapshots__/DispositionView.test.tsx.snap index 1ae443086e..6fc7fbcfcf 100644 --- a/source/frontend/src/features/mapSideBar/disposition/__snapshots__/DispositionView.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/disposition/__snapshots__/DispositionView.test.tsx.snap @@ -411,6 +411,7 @@ exports[`DispositionView component > renders as expected 1`] = ` .c31 { text-align: right; + overflow: hidden; } .c35 { diff --git a/source/frontend/src/features/mapSideBar/disposition/common/DispositionMenu.tsx b/source/frontend/src/features/mapSideBar/disposition/common/DispositionMenu.tsx index 816af41846..ec9c201dad 100644 --- a/source/frontend/src/features/mapSideBar/disposition/common/DispositionMenu.tsx +++ b/source/frontend/src/features/mapSideBar/disposition/common/DispositionMenu.tsx @@ -3,9 +3,9 @@ import { Col, Row } from 'react-bootstrap'; import { FaCaretRight } from 'react-icons/fa'; import styled from 'styled-components'; +import EditButton from '@/components/common/buttons/EditButton'; import { EditPropertiesIcon } from '@/components/common/buttons/EditPropertiesButton'; import { LinkButton } from '@/components/common/buttons/LinkButton'; -import EditButton from '@/components/common/EditButton'; import TooltipIcon from '@/components/common/TooltipIcon'; import { Claims, Roles } from '@/constants/index'; import { useKeycloakWrapper } from '@/hooks/useKeycloakWrapper'; diff --git a/source/frontend/src/features/mapSideBar/disposition/form/DispositionTeamSubForm.tsx b/source/frontend/src/features/mapSideBar/disposition/form/DispositionTeamSubForm.tsx index 3170e972cb..ca85b2602a 100644 --- a/source/frontend/src/features/mapSideBar/disposition/form/DispositionTeamSubForm.tsx +++ b/source/frontend/src/features/mapSideBar/disposition/form/DispositionTeamSubForm.tsx @@ -53,7 +53,7 @@ const DispositionTeamSubForm: React.FunctionComponent { setModalContent({ ...getDeleteModalProps(), diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/__snapshots__/DispositionFileTabs.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/tabs/__snapshots__/DispositionFileTabs.test.tsx.snap index 4c4b3fa4cc..1baf25206f 100644 --- a/source/frontend/src/features/mapSideBar/disposition/tabs/__snapshots__/DispositionFileTabs.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/disposition/tabs/__snapshots__/DispositionFileTabs.test.tsx.snap @@ -64,6 +64,7 @@ exports[`DispositionFileTabs component > matches snapshot 1`] = ` .c3 { text-align: right; + overflow: hidden; } .c7 { diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/DispositionSummaryView.tsx b/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/DispositionSummaryView.tsx index e3c7063d5a..d0d1048405 100644 --- a/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/DispositionSummaryView.tsx +++ b/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/DispositionSummaryView.tsx @@ -1,7 +1,7 @@ import { Fragment } from 'react'; import { FaExternalLinkAlt } from 'react-icons/fa'; -import EditButton from '@/components/common/EditButton'; +import EditButton from '@/components/common/buttons/EditButton'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; import { StyledEditWrapper, StyledSummarySection } from '@/components/common/Section/SectionStyles'; @@ -48,7 +48,7 @@ export const DispositionSummaryView: React.FunctionComponent + ) : null} {keycloak.hasClaim(Claims.DISPOSITION_EDIT) && dispositionFile !== undefined && diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/__snapshots__/DispositionSummaryView.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/__snapshots__/DispositionSummaryView.test.tsx.snap index 5da768d72d..99ccd29647 100644 --- a/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/__snapshots__/DispositionSummaryView.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/disposition/tabs/fileDetails/detail/__snapshots__/DispositionSummaryView.test.tsx.snap @@ -13,6 +13,7 @@ exports[`DispositionSummaryView component > matches snapshot 1`] = ` .c1 { text-align: right; + overflow: hidden; } .c5 { diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/OffersAndSaleView.tsx b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/OffersAndSaleView.tsx index 02a918c141..498ac6f380 100644 --- a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/OffersAndSaleView.tsx +++ b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/OffersAndSaleView.tsx @@ -3,7 +3,7 @@ import { FaPlus } from 'react-icons/fa'; import { useHistory, useRouteMatch } from 'react-router-dom'; import styled from 'styled-components'; -import EditButton from '@/components/common/EditButton'; +import EditButton from '@/components/common/buttons/EditButton'; import LoadingBackdrop from '@/components/common/LoadingBackdrop'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; @@ -71,7 +71,7 @@ const OffersAndSaleView: React.FunctionComponent = ({ {keycloak.hasClaim(Claims.DISPOSITION_EDIT) && canEditDetails() && ( { history.push(`${match.url}/appraisal/update`); }} @@ -166,7 +166,7 @@ const OffersAndSaleView: React.FunctionComponent = ({ {keycloak.hasClaim(Claims.DISPOSITION_EDIT) && canEditDetails() && ( { history.push(`${match.url}/sale/update`); }} diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/__snapshots__/OffersAndSaleView.test.tsx.snap b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/__snapshots__/OffersAndSaleView.test.tsx.snap index e7a30b4dec..9ebae227cb 100644 --- a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/__snapshots__/OffersAndSaleView.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/__snapshots__/OffersAndSaleView.test.tsx.snap @@ -145,7 +145,7 @@ exports[`Disposition Offer Detail View component > renders as expected 1`] = `
history.push(`${match.url}/offers/${dispositionOffer.id}/update`)} /> - { + data-testId={`Offer[${index}].delete-btn`} + onRemove={() => { setModalContent({ ...getDeleteModalProps(), variant: 'error', @@ -78,9 +76,7 @@ const DispositionOfferDetails: React.FunctionComponent - - + /> )} {keycloak.hasClaim(Claims.DISPOSITION_EDIT) && !canEditDetails() && ( diff --git a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/DispositionSalePurchasersSubForm.tsx b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/DispositionSalePurchasersSubForm.tsx index 9905052a63..0e736c8b43 100644 --- a/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/DispositionSalePurchasersSubForm.tsx +++ b/source/frontend/src/features/mapSideBar/disposition/tabs/offersAndSale/dispositionSale/form/DispositionSalePurchasersSubForm.tsx @@ -1,9 +1,8 @@ import { FieldArray, useFormikContext } from 'formik'; import React from 'react'; import { Col, Row } from 'react-bootstrap'; -import { FaTrash } from 'react-icons/fa'; -import { LinkButton, StyledRemoveLinkButton } from '@/components/common/buttons'; +import { LinkButton, RemoveIconButton } from '@/components/common/buttons'; import { ContactInputContainer } from '@/components/common/form/ContactInput/ContactInputContainer'; import ContactInputView from '@/components/common/form/ContactInput/ContactInputView'; import { PrimaryContactSelector } from '@/components/common/form/PrimaryContactSelector/PrimaryContactSelector'; @@ -41,11 +40,10 @@ const DispositionSalePurchaserSubForm: React.FunctionComponent< > - { + data-testId={`dispositionPurchasers.${index}.remove-button`} + onRemove={() => { setModalContent({ ...getDeleteModalProps(), title: 'Remove Purchaser', @@ -62,9 +60,7 @@ const DispositionSalePurchaserSubForm: React.FunctionComponent< }); setDisplayModal(true); }} - > - - + /> diff --git a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/ConsultationListView.tsx b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/ConsultationListView.tsx index d7c1e45b06..9f762f0163 100644 --- a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/ConsultationListView.tsx +++ b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/ConsultationListView.tsx @@ -1,11 +1,11 @@ import { useMemo } from 'react'; import { Col, Row } from 'react-bootstrap'; -import { FaCheckCircle, FaExclamationCircle, FaPlus, FaTimesCircle, FaTrash } from 'react-icons/fa'; +import { FaCheckCircle, FaExclamationCircle, FaPlus, FaTimesCircle } from 'react-icons/fa'; import styled from 'styled-components'; -import { StyledRemoveLinkButton } from '@/components/common/buttons/RemoveButton'; +import EditButton from '@/components/common/buttons/EditButton'; +import { RemoveIconButton } from '@/components/common/buttons/RemoveButton'; import ContactFieldContainer from '@/components/common/ContactFieldContainer'; -import EditButton from '@/components/common/EditButton'; import LoadingBackdrop from '@/components/common/LoadingBackdrop'; import { Section } from '@/components/common/Section/Section'; import { SectionField } from '@/components/common/Section/SectionField'; @@ -106,11 +106,10 @@ export const ConsultationListView: React.FunctionComponent - { + data-testId={`consultations[${index}].delete-btn`} + onRemove={() => { setModalContent({ ...getDeleteModalProps(), variant: 'error', @@ -129,16 +128,16 @@ export const ConsultationListView: React.FunctionComponent - - + /> - onEdit(consultation.id)} - /> + + onEdit(consultation.id)} + /> + )} diff --git a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/__snapshots__/ConsultationListView.test.tsx.snap b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/__snapshots__/ConsultationListView.test.tsx.snap index c73698704a..53bc07216e 100644 --- a/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/__snapshots__/ConsultationListView.test.tsx.snap +++ b/source/frontend/src/features/mapSideBar/lease/tabs/consultations/detail/__snapshots__/ConsultationListView.test.tsx.snap @@ -215,47 +215,93 @@ exports[`ConsultationListView component > renders as expected 1`] = ` } .c11.c11.btn { - color: #aaaaaa; + background-color: unset; + border: none; +} + +.c11.c11.btn:hover, +.c11.c11.btn:focus, +.c11.c11.btn:active { + background-color: unset; + outline: none; + box-shadow: none; +} + +.c11.c11.btn svg { + -webkit-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} + +.c11.c11.btn svg:hover { + -webkit-transition: all 0.3s ease-in; + transition: all 0.3s ease-in; +} + +.c11.c11.btn.btn-primary svg { + color: #013366; +} + +.c11.c11.btn.btn-primary svg:hover { + color: #013366; +} + +.c11.c11.btn.btn-light svg { + color: var(--surface-color-primary-button-default); +} + +.c11.c11.btn.btn-light svg:hover { + color: #CE3E39; +} + +.c11.c11.btn.btn-info svg { + color: var(--surface-color-primary-button-default); +} + +.c11.c11.btn.btn-info svg:hover { + color: var(--surface-color-primary-button-hover); +} + +.c12.c12.btn.btn-primary { -webkit-text-decoration: none; text-decoration: none; line-height: unset; } -.c11.c11.btn .text { +.c12.c12.btn.btn-primary svg { + color: #aaaaaa !important; +} + +.c12.c12.btn.btn-primary .text { display: none; } -.c11.c11.btn:hover, -.c11.c11.btn:active, -.c11.c11.btn:focus { - color: #d8292f; +.c12.c12.btn.btn-primary svg:hover, +.c12.c12.btn.btn-primary svg:active, +.c12.c12.btn.btn-primary svg:focus { + color: #d8292f !important; -webkit-text-decoration: none; text-decoration: none; opacity: unset; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; } -.c11.c11.btn:hover .text, -.c11.c11.btn:active .text, -.c11.c11.btn:focus .text { +.c12.c12.btn.btn-primary svg:hover .text, +.c12.c12.btn.btn-primary svg:active .text, +.c12.c12.btn.btn-primary svg:focus .text { display: inline; line-height: 2rem; } -.c13.required::before { +.c15.required::before { content: '*'; position: absolute; top: 0.75rem; left: 0rem; } -.c12 { +.c14 { font-weight: bold; } @@ -324,6 +370,29 @@ exports[`ConsultationListView component > renders as expected 1`] = ` margin: 0; } +.c13 { + display: -webkit-box; + display: -webkit-flex; + display: -ms-flexbox; + display: flex; + -webkit-flex-direction: row; + -ms-flex-direction: row; + flex-direction: row; + -webkit-box-pack: end; + -webkit-justify-content: flex-end; + -ms-flex-pack: end; + justify-content: flex-end; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; + margin-bottom: 0.5rem; + -webkit-align-items: center; + -webkit-box-align: center; + -ms-flex-align: center; + align-items: center; +} + .c10 { border: solid 0.2rem var(--theme-blue-90); margin-bottom: 1.5rem; @@ -430,7 +499,7 @@ exports[`ConsultationListView component > renders as expected 1`] = `
renders as expected 1`] = `
renders as expected 1`] = `
renders as expected 1`] = `
renders as expected 1`] = `
renders as expected 1`] = ` class="px-1 col-auto" >
- +
+ + + +
+ +
@@ -817,7 +894,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
Jan 1, 2024
@@ -857,7 +934,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
renders as expected 1`] = ` class="pr-0 text-left col-4" >
Yes
@@ -913,13 +990,13 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
Dec 1, 2024
@@ -931,7 +1008,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
test comment
@@ -995,7 +1072,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="px-1 col-auto" > +
+ + + +
+ + @@ -1058,7 +1143,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
Jan 1, 2024
@@ -1098,7 +1183,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
renders as expected 1`] = ` class="pr-0 text-left col-4" >
Yes
@@ -1154,13 +1239,13 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
Dec 1, 2024
@@ -1172,7 +1257,7 @@ exports[`ConsultationListView component > renders as expected 1`] = ` class="pr-0 text-left col-4" >
test comment
@@ -1237,7 +1322,7 @@ exports[`ConsultationListView component > renders as expected 1`] = `
renders as expected 1`] = `
- handleRemove(index)} - > - - + handleRemove(index)} + /> renders as expected with existing data 1`] = } .c8.c8.btn { - color: #aaaaaa; + background-color: unset; + border: none; +} + +.c8.c8.btn:hover, +.c8.c8.btn:focus, +.c8.c8.btn:active { + background-color: unset; + outline: none; + box-shadow: none; +} + +.c8.c8.btn svg { + -webkit-transition: all 0.3s ease-out; + transition: all 0.3s ease-out; +} + +.c8.c8.btn svg:hover { + -webkit-transition: all 0.3s ease-in; + transition: all 0.3s ease-in; +} + +.c8.c8.btn.btn-primary svg { + color: #013366; +} + +.c8.c8.btn.btn-primary svg:hover { + color: #013366; +} + +.c8.c8.btn.btn-light svg { + color: var(--surface-color-primary-button-default); +} + +.c8.c8.btn.btn-light svg:hover { + color: #CE3E39; +} + +.c8.c8.btn.btn-info svg { + color: var(--surface-color-primary-button-default); +} + +.c8.c8.btn.btn-info svg:hover { + color: var(--surface-color-primary-button-hover); +} + +.c9.c9.btn.btn-primary { -webkit-text-decoration: none; text-decoration: none; line-height: unset; } -.c8.c8.btn .text { +.c9.c9.btn.btn-primary svg { + color: #aaaaaa !important; +} + +.c9.c9.btn.btn-primary .text { display: none; } -.c8.c8.btn:hover, -.c8.c8.btn:active, -.c8.c8.btn:focus { - color: #d8292f; +.c9.c9.btn.btn-primary svg:hover, +.c9.c9.btn.btn-primary svg:active, +.c9.c9.btn.btn-primary svg:focus { + color: #d8292f !important; -webkit-text-decoration: none; text-decoration: none; opacity: unset; - display: -webkit-box; - display: -webkit-flex; - display: -ms-flexbox; - display: flex; -webkit-flex-direction: row; -ms-flex-direction: row; flex-direction: row; } -.c8.c8.btn:hover .text, -.c8.c8.btn:active .text, -.c8.c8.btn:focus .text { +.c9.c9.btn.btn-primary svg:hover .text, +.c9.c9.btn.btn-primary svg:active .text, +.c9.c9.btn.btn-primary svg:focus .text { display: inline; line-height: 2rem; } -.c9 .react-datepicker__calendar-icon { +.c10 .react-datepicker__calendar-icon { width: 2.4rem; height: 3rem; margin-top: 0.5rem; @@ -964,19 +1010,19 @@ exports[`AddProjectForm component > renders as expected with existing data 1`] = pointer-events: none; } -.c9 .react-datepicker__view-calendar-icon input { +.c10 .react-datepicker__view-calendar-icon input { padding: 0.8rem 1.2rem 0.8rem 1.2rem; } -.c9 .react-datepicker-wrapper { +.c10 .react-datepicker-wrapper { max-width: 17rem; } -.c10.c10.form-control.is-valid { +.c11.c11.form-control.is-valid { background-image: none; } -.c10.c10.form-control.is-invalid { +.c11.c11.form-control.is-invalid { border-color: #d8292f !important; } @@ -1010,13 +1056,13 @@ exports[`AddProjectForm component > renders as expected with existing data 1`] = font-weight: bold; } -.c11 textarea.form-control { +.c12 textarea.form-control { min-width: 80rem; height: 7rem; resize: none; } -.c12 { +.c13 { border-bottom: 0.1rem solid grey; } @@ -1476,8 +1522,9 @@ exports[`AddProjectForm component > renders as expected with existing data 1`] = class="col-auto" >
renders as expected with existing data 1`] = > renders as expected with existing data 1`] = class="c4 text-left col-4" >
renders as expected with existing data 1`] = renders as expected with existing data 1`] = class="c4 text-left col" >
renders as expected with existing data 1`] = renders as expected with existing data 1`] = class="c4 text-left col" >