From abfaf368dc4b3432048f9cef8cce470792f3808a Mon Sep 17 00:00:00 2001 From: memosys Date: Thu, 28 Dec 2023 21:46:27 +0530 Subject: [PATCH] Styling updates for DM v2.2 and SEO-RODEO-II (#109) * 01- Buttons * 02- Tabs * 03- radio items * 03- TextArea, Selects, Inputs Added solid outline variant * bumped package number * Code Review updates + breaking changes fixed --- .vscode/settings.json | 7 +- package.json | 2 +- src/components/chakra/index.ts | 2 + .../forms/DatePicker/DatePicker.tsx | 2 +- src/components/forms/Select/Select.tsx | 2 +- .../ControlledSelect/ControlledSelect.tsx | 2 +- .../molecules/ButtonGroup/ButtonGroup.tsx | 2 +- src/stories/atoms/Tabs.stories.tsx | 33 +++++--- src/stories/forms/Input.stories.tsx | 1 + src/stories/forms/NumberInput.stories.tsx | 1 + src/stories/forms/Select.stories.tsx | 17 +++- src/stories/forms/Textarea.stories.tsx | 1 + .../controlled/ControlledInput.stories.tsx | 1 + .../ControlledNumberInput.stories.tsx | 1 + .../controlled/ControlledSelect.stories.tsx | 4 +- .../controlled/ControlledTextarea.stories.tsx | 1 + src/theme/colors.ts | 4 +- src/theme/components/Button.ts | 77 +++++++++++-------- src/theme/components/Input.ts | 8 ++ src/theme/components/NumberInput.ts | 8 ++ src/theme/components/RadioBox.ts | 9 ++- src/theme/components/Select.ts | 7 ++ src/theme/components/Tabs.ts | 29 +++++++ src/theme/components/Textarea.ts | 6 ++ src/theme/gradientStyles.ts | 8 ++ src/theme/index.ts | 2 + 26 files changed, 177 insertions(+), 60 deletions(-) create mode 100644 src/theme/components/Tabs.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 3975db1..9459714 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,13 +2,16 @@ "editor.formatOnSave": true, "editor.defaultFormatter": "dbaeumer.vscode-eslint", "editor.codeActionsOnSave": { - "source.fixAll.eslint": true -}, + "source.fixAll.eslint": "always" + }, "eslint.validate": [ "javascript", "typescript" ], "[yaml]": { "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" } } \ No newline at end of file diff --git a/package.json b/package.json index 4ca687d..e863bbb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@raidguild/design-system", - "version": "0.5.3", + "version": "0.5.5", "license": "MIT", "author": "Raid Guild", "main": "./dist/src/index.js", diff --git a/src/components/chakra/index.ts b/src/components/chakra/index.ts index ce240fa..8e4447d 100644 --- a/src/components/chakra/index.ts +++ b/src/components/chakra/index.ts @@ -200,4 +200,6 @@ export type { ToastProps as ChakraToastProps, TooltipProps as ChakraTooltipProps, WrapProps as ChakraWrapProps, + TabsProps, + TabProps, } from '@chakra-ui/react'; diff --git a/src/components/forms/DatePicker/DatePicker.tsx b/src/components/forms/DatePicker/DatePicker.tsx index ac20e47..0321bd1 100644 --- a/src/components/forms/DatePicker/DatePicker.tsx +++ b/src/components/forms/DatePicker/DatePicker.tsx @@ -36,7 +36,7 @@ const DatePicker: React.FC = ({ localForm, registerOptions, tooltip, - variant, + variant = 'ghost', spacing, ...props }: DatePickerProps) => { diff --git a/src/components/forms/Select/Select.tsx b/src/components/forms/Select/Select.tsx index 1119018..e58da00 100644 --- a/src/components/forms/Select/Select.tsx +++ b/src/components/forms/Select/Select.tsx @@ -41,7 +41,7 @@ export interface SelectProps { isSearchable?: boolean; onChange?: (option: Option) => void; isDisabled?: boolean; - variant?: 'outline' | 'filled' | 'flushed' | undefined; + variant?: 'outline' | 'filled' | 'flushed' | 'solidOutline' | undefined; basicStyles?: boolean; value?: unknown; colorScheme?: diff --git a/src/components/forms/controlled/ControlledSelect/ControlledSelect.tsx b/src/components/forms/controlled/ControlledSelect/ControlledSelect.tsx index bd37623..35fb285 100644 --- a/src/components/forms/controlled/ControlledSelect/ControlledSelect.tsx +++ b/src/components/forms/controlled/ControlledSelect/ControlledSelect.tsx @@ -23,7 +23,7 @@ export interface ControlledSelectProps { isClearable?: boolean; onChange?: (option: Option) => void; isDisabled?: boolean; - variant?: 'outline' | 'filled' | 'flushed' | undefined; + variant?: 'outline' | 'filled' | 'flushed' | 'solidOutline' | undefined; basicStyles?: boolean; // eslint-disable-next-line @typescript-eslint/no-explicit-any value?: any; diff --git a/src/components/molecules/ButtonGroup/ButtonGroup.tsx b/src/components/molecules/ButtonGroup/ButtonGroup.tsx index 748dcf2..b844f59 100644 --- a/src/components/molecules/ButtonGroup/ButtonGroup.tsx +++ b/src/components/molecules/ButtonGroup/ButtonGroup.tsx @@ -61,7 +61,7 @@ const ButtonGroup: React.FC = ({ return (