From 338bedc39f913f67d0547c765885f4d7f96da42e Mon Sep 17 00:00:00 2001 From: TheoryOfNekomata Date: Mon, 4 Sep 2023 17:49:35 +0800 Subject: [PATCH] Ensure all text controls have solid background Make all text controls have solid background for readability. --- .../src/components/FileSelectBox/index.tsx | 2 +- .../react/src/components/ComboBox/index.tsx | 2 +- .../src/components/DropdownSelect/index.tsx | 6 +- .../src/components/RadioButton/index.tsx | 4 +- .../src/components/RadioTickBox/index.tsx | 5 +- .../src/components/MaskedTextInput/index.tsx | 67 ++++++++++--------- .../react/src/components/TextInput/index.tsx | 67 ++++++++++--------- .../react/src/components/Badge/index.tsx | 2 +- .../src/components/ToggleButton/index.tsx | 58 +++++++++------- .../src/components/ToggleTickBox/index.tsx | 1 + .../src/components/NumberSpinner/index.tsx | 4 +- .../src/components/DateDropdown/index.tsx | 4 +- .../src/components/TimeSpinner/index.tsx | 4 +- 13 files changed, 121 insertions(+), 105 deletions(-) diff --git a/categories/web/blob/react/src/components/FileSelectBox/index.tsx b/categories/web/blob/react/src/components/FileSelectBox/index.tsx index 39a862b..e91a4f3 100644 --- a/categories/web/blob/react/src/components/FileSelectBox/index.tsx +++ b/categories/web/blob/react/src/components/FileSelectBox/index.tsx @@ -427,7 +427,7 @@ export const FileSelectBox = React.forwardRef( list={datalistId} data-testid="input" className={tw( - 'rounded-inherit w-full peer block font-inherit bg-transparent box-border', + 'rounded-inherit w-full peer block font-inherit bg-negative box-border', 'focus:outline-0', 'disabled:opacity-50 disabled:cursor-not-allowed', { diff --git a/categories/web/choice/react/src/components/DropdownSelect/index.tsx b/categories/web/choice/react/src/components/DropdownSelect/index.tsx index 8720b40..67a0b4f 100644 --- a/categories/web/choice/react/src/components/DropdownSelect/index.tsx +++ b/categories/web/choice/react/src/components/DropdownSelect/index.tsx @@ -69,8 +69,6 @@ export const dropdownSelectPlugin: tailwind.PluginCreator = ({ addComponents }) }); }; -// todo remove bg-negative - /** * Component for selecting a single value from a dropdown. */ @@ -115,7 +113,7 @@ export const DropdownSelect = React.forwardRef {hint && (
{hint && (
(( style={style} data-testid="badge" > - + {children} diff --git a/categories/web/multichoice/react/src/components/ToggleButton/index.tsx b/categories/web/multichoice/react/src/components/ToggleButton/index.tsx index 41201d1..d4d9d3c 100644 --- a/categories/web/multichoice/react/src/components/ToggleButton/index.tsx +++ b/categories/web/multichoice/react/src/components/ToggleButton/index.tsx @@ -116,30 +116,32 @@ export const ToggleButton = React.forwardRef @@ -230,6 +232,14 @@ export const ToggleButton = React.forwardRef )} + { + variant !== 'bare' + && ( + + ) + } ); diff --git a/categories/web/multichoice/react/src/components/ToggleTickBox/index.tsx b/categories/web/multichoice/react/src/components/ToggleTickBox/index.tsx index 789e191..b11d1e5 100644 --- a/categories/web/multichoice/react/src/components/ToggleTickBox/index.tsx +++ b/categories/web/multichoice/react/src/components/ToggleTickBox/index.tsx @@ -115,6 +115,7 @@ export const ToggleTickBox = React.forwardRef