From 603179dda1c257175e0e6ab7a14835f2156b4321 Mon Sep 17 00:00:00 2001 From: Rick Cuddy Date: Tue, 11 Oct 2022 22:19:01 +1100 Subject: [PATCH] a11y: update cleared state display for clarity Create new CircleEmpty svg and set uncleared state to use new icon. Add 'cursor: pointer' to the cleared field to aid in action awareness. --- .../components/accounts/TransactionsTable.js | 5 +++-- .../src/components/schedules/StatusBadge.js | 8 +++++++- .../src/svg/v2/CheckCircleHollow.js | 19 +++++++++++++++++++ 3 files changed, 29 insertions(+), 3 deletions(-) create mode 100644 packages/loot-design/src/svg/v2/CheckCircleHollow.js diff --git a/packages/desktop-client/src/components/accounts/TransactionsTable.js b/packages/desktop-client/src/components/accounts/TransactionsTable.js index 3613391..2d25cbe 100644 --- a/packages/desktop-client/src/components/accounts/TransactionsTable.js +++ b/packages/desktop-client/src/components/accounts/TransactionsTable.js @@ -336,7 +336,7 @@ function StatusCell({ ? colors.y5 : selected ? colors.b7 - : colors.n6 + : colors.n7 }; function onSelect() { @@ -362,7 +362,8 @@ function StatusCell({ ':focus': { border: '1px solid ' + props.color, boxShadow: `0 1px 2px ${props.color}` - } + }, + cursor: isClearedField ? 'pointer' : 'default' }, isChild && { visibility: 'hidden' } diff --git a/packages/desktop-client/src/components/schedules/StatusBadge.js b/packages/desktop-client/src/components/schedules/StatusBadge.js index 19ada2b..17a95ef 100644 --- a/packages/desktop-client/src/components/schedules/StatusBadge.js +++ b/packages/desktop-client/src/components/schedules/StatusBadge.js @@ -6,6 +6,7 @@ import { colors } from 'loot-design/src/style'; import AlertTriangle from 'loot-design/src/svg/v2/AlertTriangle'; import CalendarIcon from 'loot-design/src/svg/v2/Calendar'; import CheckCircle1 from 'loot-design/src/svg/v2/CheckCircle1'; +import CheckCircleHollow from 'loot-design/src/svg/v2/CheckCircleHollow'; import EditSkull1 from 'loot-design/src/svg/v2/EditSkull1'; import FavoriteStar from 'loot-design/src/svg/v2/FavoriteStar'; import ValidationCheck from 'loot-design/src/svg/v2/ValidationCheck'; @@ -49,10 +50,15 @@ export function getStatusProps(status) { backgroundColor = colors.n11; Icon = CalendarIcon; break; + case 'cleared': + color = colors.g5; + backgroundColor = colors.n11; + Icon = CheckCircle1; + break; default: color = colors.n1; backgroundColor = colors.n11; - Icon = CheckCircle1; + Icon = CheckCircleHollow; break; } diff --git a/packages/loot-design/src/svg/v2/CheckCircleHollow.js b/packages/loot-design/src/svg/v2/CheckCircleHollow.js new file mode 100644 index 0000000..4f7df66 --- /dev/null +++ b/packages/loot-design/src/svg/v2/CheckCircleHollow.js @@ -0,0 +1,19 @@ +import React from 'react'; + +const SvgCheckCircleHollow = props => ( + + + +); + +export default SvgCheckCircleHollow;