From d94b4b2a3c23f5b40e58c2cdb267dc22867883b0 Mon Sep 17 00:00:00 2001 From: Scott Wilson Date: Thu, 17 Oct 2024 10:17:23 -0700 Subject: [PATCH 1/2] feat: select all on page for secrets tables and fix multipage select behavior for actions --- .../src/components/v2/Checkbox/Checkbox.tsx | 10 +- .../SecretMainPage/SecretMainPage.store.tsx | 18 +- .../views/SecretMainPage/SecretMainPage.tsx | 367 ++++++++++-------- .../components/ActionBar/ActionBar.tsx | 10 +- .../components/SecretListView/SecretItem.tsx | 4 +- .../SecretListView/SecretListView.tsx | 2 +- .../SecretOverviewPage/SecretOverviewPage.tsx | 133 +++++-- .../SelectionPanel/SelectionPanel.tsx | 32 +- 8 files changed, 356 insertions(+), 220 deletions(-) diff --git a/frontend/src/components/v2/Checkbox/Checkbox.tsx b/frontend/src/components/v2/Checkbox/Checkbox.tsx index 8c7472b26..751a026c3 100644 --- a/frontend/src/components/v2/Checkbox/Checkbox.tsx +++ b/frontend/src/components/v2/Checkbox/Checkbox.tsx @@ -1,5 +1,5 @@ import { ReactNode } from "react"; -import { faCheck } from "@fortawesome/free-solid-svg-icons"; +import { faCheck, faMinus } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import * as CheckboxPrimitive from "@radix-ui/react-checkbox"; import { twMerge } from "tailwind-merge"; @@ -15,6 +15,7 @@ export type CheckboxProps = Omit< isRequired?: boolean; checkIndicatorBg?: string | undefined; isError?: boolean; + isIndeterminate?: boolean; }; export const Checkbox = ({ @@ -26,6 +27,7 @@ export const Checkbox = ({ isRequired, checkIndicatorBg, isError, + isIndeterminate, ...props }: CheckboxProps): JSX.Element => { return ( @@ -45,7 +47,11 @@ export const Checkbox = ({ id={id} > - + {isIndeterminate ? ( + + ) : ( + + )}