From 6daa7a6d40e82b205346a825cc67662eab278956 Mon Sep 17 00:00:00 2001 From: Alireza Safaierad Date: Fri, 15 Sep 2023 02:53:53 +0400 Subject: [PATCH] pay technical debt --- @types/mantine.d.ts | 8 +- app/Auth/Login/Login.tsx | 31 +- app/Dashboard/DashboardLayout.tsx | 2 +- .../HouseholdDetail/HouseholdDetail.tsx | 2 +- .../HouseholderForm/HouseholderForm.tsx | 2 +- .../MemberEmptyState/MemberEmptyState.tsx | 14 +- .../_components/MemberForm/MemberForm.tsx | 303 +- .../_components/MemberList/MemberList.tsx | 2 +- .../HouseholdEmptyState.tsx | 10 +- .../CreateHouseholdForm.tsx | 11 +- .../DeleteHouseholdModal.tsx | 1 + .../HouseholdActionButton.tsx | 2 +- .../CreateProjectForm/CreateProjectForm.tsx | 16 +- .../ProjectActionButton.tsx | 2 +- .../Projects/ProjectDetail/ProjectDetail.tsx | 2 +- .../ProjectEmptyState/ProjectEmptyState.tsx | 11 +- .../ProjectStatusBadge/ProjectStatusBadge.tsx | 2 +- .../_components/LogoutModal/LogoutConfirm.tsx | 2 +- app/messages.ts | 18 +- libs/design/Alert/Alert.tsx | 4 +- libs/design/Badge/Badge.stories.tsx | 11 +- libs/design/Badge/Badge.tsx | 13 +- libs/design/Breadcrumbs/Breadcrumbs.tsx | 13 +- .../CollapsibleDashboardCard.stories.tsx | 23 - .../CollapsibleDashboardCard.tsx | 50 - .../DashboardCard/DashboardCard.stories.tsx | 1 - libs/design/DashboardCard/DashboardCard.tsx | 15 +- libs/design/DashboardCard/index.ts | 1 - libs/design/DashboardTitle/DashboardTitle.tsx | 2 +- libs/design/DateInput/DateInput.tsx | 6 +- libs/design/DateSummery/DateSummery.tsx | 2 +- .../DestructiveButton/DestructiveButton.tsx | 2 +- libs/design/DetailCard/DetailCard.tsx | 2 +- .../design/DetailCard/DetailCardDateField.tsx | 2 +- .../design/DetailCard/DetailCardTextField.tsx | 2 +- libs/design/EmptyState/EmptyState.stories.tsx | 2 +- libs/design/EmptyState/EmptyState.tsx | 9 +- libs/design/FileUpload/File.tsx | 6 +- libs/design/FileUpload/FileSelect.tsx | 4 +- libs/design/FileUpload/FileUpload.tsx | 6 +- libs/design/Modal/ShowModal.tsx | 10 +- libs/design/NavLink/NavLink.tsx | 12 +- libs/design/Notification/showNotification.ts | 4 +- libs/design/Sidebar/Sidebar.tsx | 6 +- libs/design/SmallText/SmallText.tsx | 2 +- libs/design/Tabs/Tabs.tsx | 8 +- .../VisualizedIcon/VisualizedIcon.stories.tsx | 2 +- libs/design/VisualizedIcon/VisualizedIcon.tsx | 18 +- libs/design/theme/palette.ts | 104 + libs/design/theme/theme.ts | 73 +- libs/design/theme/themeUtils.ts | 32 - package-lock.json | 2524 +++++++++++------ package.json | 24 +- 53 files changed, 2031 insertions(+), 1405 deletions(-) delete mode 100644 libs/design/DashboardCard/CollapsibleDashboardCard.stories.tsx delete mode 100644 libs/design/DashboardCard/CollapsibleDashboardCard.tsx create mode 100644 libs/design/theme/palette.ts diff --git a/@types/mantine.d.ts b/@types/mantine.d.ts index 3a9fc1ad..d0810bd9 100644 --- a/@types/mantine.d.ts +++ b/@types/mantine.d.ts @@ -1,6 +1,6 @@ import type { Tuple } from '@mantine/core'; -import type { colors } from '../libs/design/theme/theme'; +import type { Palette } from '../libs/design/theme/palette'; type DefaultMantineColors = | 'blue' @@ -19,11 +19,9 @@ type DefaultMantineColors = | 'violet' | 'yellow'; -type IndexifyColor = T extends DefaultMantineColors - ? T | `${T}.${0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}` - : T; +type IndexifyColor = T | `${T}.${0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9}`; -type Colors = IndexifyColor; +type Colors = IndexifyColor; declare module '@mantine/core' { export interface MantineThemeColorsOverride { diff --git a/app/Auth/Login/Login.tsx b/app/Auth/Login/Login.tsx index 555039c8..a341180c 100644 --- a/app/Auth/Login/Login.tsx +++ b/app/Auth/Login/Login.tsx @@ -1,25 +1,24 @@ import { useAuth0 } from '@camp/auth'; import { messages } from '@camp/messages'; -import { Button, Center, Group, Image } from '@mantine/core'; +import { Button, Center, Flex, Image, Text, Title } from '@mantine/core'; export const Login = () => { const { loginWithRedirect } = useAuth0(); return ( - -
- -
-
({ - backgroundColor: theme.colors.bgCanvas[6], - height: '100%', - })} - > - login -
-
+
+ + logo + + + {messages.login.title} + {messages.login.desc} + + + + +
); }; diff --git a/app/Dashboard/DashboardLayout.tsx b/app/Dashboard/DashboardLayout.tsx index 7ef16ba6..3436f96a 100644 --- a/app/Dashboard/DashboardLayout.tsx +++ b/app/Dashboard/DashboardLayout.tsx @@ -18,7 +18,7 @@ const useStyles = createStyles(theme => ({ paddingTop: 30, paddingBottom: 0, paddingInline: 40, - backgroundColor: theme.colors.bgCanvas[6], + backgroundColor: theme.colors.bg[6], overflow: 'auto', }, })); diff --git a/app/Dashboard/Households/HouseholdDetail/HouseholdDetail.tsx b/app/Dashboard/Households/HouseholdDetail/HouseholdDetail.tsx index f8177ddb..ee96d46b 100644 --- a/app/Dashboard/Households/HouseholdDetail/HouseholdDetail.tsx +++ b/app/Dashboard/Households/HouseholdDetail/HouseholdDetail.tsx @@ -46,7 +46,7 @@ const resolver = createResolver({ const useStyles = createStyles(theme => ({ input: { label: { - color: theme.colors.fgSubtle[6], + color: theme.colors.fg[4], }, }, })); diff --git a/app/Dashboard/Households/HouseholdDetail/_components/HouseholderForm/HouseholderForm.tsx b/app/Dashboard/Households/HouseholdDetail/_components/HouseholderForm/HouseholderForm.tsx index ec08a8bf..80811bc5 100644 --- a/app/Dashboard/Households/HouseholdDetail/_components/HouseholderForm/HouseholderForm.tsx +++ b/app/Dashboard/Households/HouseholdDetail/_components/HouseholderForm/HouseholderForm.tsx @@ -65,7 +65,7 @@ const resolver = createResolver({ const useStyles = createStyles(theme => ({ input: { label: { - color: theme.colors.fgSubtle[6], + color: theme.colors.fg[4], }, }, })); diff --git a/app/Dashboard/Households/HouseholdDetail/_components/MemberForm/MemberEmptyState/MemberEmptyState.tsx b/app/Dashboard/Households/HouseholdDetail/_components/MemberForm/MemberEmptyState/MemberEmptyState.tsx index 31802c49..7d1e9290 100644 --- a/app/Dashboard/Households/HouseholdDetail/_components/MemberForm/MemberEmptyState/MemberEmptyState.tsx +++ b/app/Dashboard/Households/HouseholdDetail/_components/MemberForm/MemberEmptyState/MemberEmptyState.tsx @@ -1,7 +1,6 @@ import { EmptyState } from '@camp/design'; import { UserIcon } from '@camp/icons'; import { messages } from '@camp/messages'; -import { useMantineTheme } from '@mantine/core'; import { CreateMemberButton } from '../CreateMemberButton'; @@ -10,21 +9,10 @@ interface Props { } export const MemberEmptyState = ({ addNewMember }: Props) => { - const theme = useMantineTheme(); const t = messages.member.empty; return ( - - } - title={t.title} - message={t.description} - > + ); diff --git a/app/Dashboard/Households/HouseholdDetail/_components/MemberForm/MemberForm.tsx b/app/Dashboard/Households/HouseholdDetail/_components/MemberForm/MemberForm.tsx index 6c7a8b1f..6f8e2076 100644 --- a/app/Dashboard/Households/HouseholdDetail/_components/MemberForm/MemberForm.tsx +++ b/app/Dashboard/Households/HouseholdDetail/_components/MemberForm/MemberForm.tsx @@ -5,9 +5,9 @@ import { } from '@camp/data-layer'; import { debug } from '@camp/debug'; import { - CollapsibleDashboardCard, ControlledDateInput, ControlledSelect, + DashboardCard, DestructiveButton, showNotification, TextInput, @@ -25,12 +25,14 @@ import { nationalities, religions, } from '@camp/domain'; -import { CheckIcon, EditIcon, TrashIcon } from '@camp/icons'; +import { CheckIcon, ChevronDownIcon, EditIcon, TrashIcon } from '@camp/icons'; import { messages } from '@camp/messages'; import { createTestAttr } from '@camp/test'; import { isNull } from '@fullstacksjs/toolbox'; import { + ActionIcon, Button, + Collapse, createStyles, Group, SimpleGrid, @@ -47,12 +49,12 @@ import { memberFormIds as ids } from './MemberForm.ids'; const useStyles = createStyles(theme => ({ textInput: { label: { - color: theme.colors.fgSubtle[6], + color: theme.colors.fg[4], }, }, dateInput: { label: { - color: theme.colors.fgSubtle[6], + color: theme.colors.fg[4], }, }, })); @@ -99,7 +101,7 @@ export const MemberForm = ({ onUndo, }: Props) => { const [createMemberMutation] = useUpsertMemberMutation(); - const [opened, { toggle }] = useDisclosure(!initialMember?.isCompleted); + const [opened, { toggle }] = useDisclosure(true); const [isEditableMode, { toggle: toggleEditableMode }] = useBoolean( !initialMember, ); @@ -175,13 +177,16 @@ export const MemberForm = ({ }); return ( - + + + } + right={ - - {name ? `${name} ${surname ?? ''}` : t.createForm.title} + <Title order={4} color="fg" weight="bold"> + {name ? `${name} ${surname!}` : t.createForm.title} } > -
- - - - - - ({ - value: v, - label: messages.nationalities[v], - }))} - placeholder={tt.selectInputs.placeholder} - label={`${tt.nationalityInput.label}:`} - /> - - ({ - value: v, - label: messages.genders[v], - }))} - label={`${tt.genderInput.label}:`} - placeholder={tt.selectInputs.placeholder} - /> - - ({ - value: v, - label: messages.religions[v], - }))} - placeholder={tt.selectInputs.placeholder} - label={`${tt.religionInput.label}:`} - /> - - {!isEditableMode ? ( - - - - - ) : ( - - { - reset(); - onUndo?.(); - }} - > - {messages.actions.undoBtn} - - - - )} - -
-
+ +
+ + + + + + ({ + value: v, + label: messages.nationalities[v], + }))} + placeholder={tt.selectInputs.placeholder} + label={`${tt.nationalityInput.label}:`} + /> + + ({ + value: v, + label: messages.genders[v], + }))} + label={`${tt.genderInput.label}:`} + placeholder={tt.selectInputs.placeholder} + /> + + ({ + value: v, + label: messages.religions[v], + }))} + placeholder={tt.selectInputs.placeholder} + label={`${tt.religionInput.label}:`} + /> + + {!isEditableMode ? ( + + + + + ) : ( + + { + reset(); + onUndo?.(); + }} + > + {messages.actions.undoBtn} + + + + )} + +
+
+ ); }; diff --git a/app/Dashboard/Households/HouseholdDetail/_components/MemberList/MemberList.tsx b/app/Dashboard/Households/HouseholdDetail/_components/MemberList/MemberList.tsx index ed2d5134..b5b4d5a5 100644 --- a/app/Dashboard/Households/HouseholdDetail/_components/MemberList/MemberList.tsx +++ b/app/Dashboard/Households/HouseholdDetail/_components/MemberList/MemberList.tsx @@ -2,7 +2,7 @@ import { useMemberListQuery } from '@camp/data-layer'; import { debug } from '@camp/debug'; import { DashboardTitle, FullPageLoader, showNotification } from '@camp/design'; import { errorMessages, messages } from '@camp/messages'; -import { Center, Group, Stack, Title } from '@mantine/core'; +import { Center, Group, Stack } from '@mantine/core'; import { useState } from 'react'; import { CreateMemberButton, MemberForm } from '../MemberForm'; diff --git a/app/Dashboard/Households/HouseholdEmptyState/HouseholdEmptyState.tsx b/app/Dashboard/Households/HouseholdEmptyState/HouseholdEmptyState.tsx index 39a5db9a..505a637c 100644 --- a/app/Dashboard/Households/HouseholdEmptyState/HouseholdEmptyState.tsx +++ b/app/Dashboard/Households/HouseholdEmptyState/HouseholdEmptyState.tsx @@ -1,21 +1,13 @@ import { EmptyState } from '@camp/design'; import { PeopleIcon } from '@camp/icons'; import { messages } from '@camp/messages'; -import { useMantineTheme } from '@mantine/core'; import { CreateHouseholdButton } from '../_components/CreateHousehold'; export const HouseholdEmptyState = () => { - const theme = useMantineTheme(); return ( - } + Icon={PeopleIcon} title={messages.households.empty.title} message={messages.households.empty.description} > diff --git a/app/Dashboard/Households/_components/CreateHousehold/CreateHouseholdForm/CreateHouseholdForm.tsx b/app/Dashboard/Households/_components/CreateHousehold/CreateHouseholdForm/CreateHouseholdForm.tsx index dbae64f2..2ae02740 100644 --- a/app/Dashboard/Households/_components/CreateHousehold/CreateHouseholdForm/CreateHouseholdForm.tsx +++ b/app/Dashboard/Households/_components/CreateHousehold/CreateHouseholdForm/CreateHouseholdForm.tsx @@ -75,14 +75,19 @@ export const CreateHouseholdForm = ({ dismiss }: Props) => { wrapperProps={createTestAttr(ids.nameInput)} {...register('name')} /> - - + - diff --git a/app/Dashboard/Projects/ProjectActionButton/ProjectActionButton.tsx b/app/Dashboard/Projects/ProjectActionButton/ProjectActionButton.tsx index 2e3a68e6..a619bb0b 100644 --- a/app/Dashboard/Projects/ProjectActionButton/ProjectActionButton.tsx +++ b/app/Dashboard/Projects/ProjectActionButton/ProjectActionButton.tsx @@ -29,7 +29,7 @@ export const ProjectActionButton = ({ {messages.actions.open} - {messages.actions.delete} + {messages.actions.delete} ); diff --git a/app/Dashboard/Projects/ProjectDetail/ProjectDetail.tsx b/app/Dashboard/Projects/ProjectDetail/ProjectDetail.tsx index 1b8840ab..a38b2113 100644 --- a/app/Dashboard/Projects/ProjectDetail/ProjectDetail.tsx +++ b/app/Dashboard/Projects/ProjectDetail/ProjectDetail.tsx @@ -47,7 +47,7 @@ export const ProjectDetail = () => { {isEmpty(households) ? ( - {t.projectFields.membersCount.empty} + {t.projectFields.membersCount.empty} ) : ( households.length )} diff --git a/app/Dashboard/Projects/ProjectEmptyState/ProjectEmptyState.tsx b/app/Dashboard/Projects/ProjectEmptyState/ProjectEmptyState.tsx index 7c555aeb..9141057c 100644 --- a/app/Dashboard/Projects/ProjectEmptyState/ProjectEmptyState.tsx +++ b/app/Dashboard/Projects/ProjectEmptyState/ProjectEmptyState.tsx @@ -1,22 +1,13 @@ import { EmptyState } from '@camp/design'; import { PackageIcon } from '@camp/icons'; import { messages } from '@camp/messages'; -import { useMantineTheme } from '@mantine/core'; import { CreateProjectButton } from '../CreateProject'; export const ProjectEmptyState = () => { - const theme = useMantineTheme(); - return ( - } + Icon={PackageIcon} title={messages.projects.empty.title} message={messages.projects.empty.description} > diff --git a/app/Dashboard/Projects/_components/ProjectStatusBadge/ProjectStatusBadge.tsx b/app/Dashboard/Projects/_components/ProjectStatusBadge/ProjectStatusBadge.tsx index 2d4a588b..5a22400a 100644 --- a/app/Dashboard/Projects/_components/ProjectStatusBadge/ProjectStatusBadge.tsx +++ b/app/Dashboard/Projects/_components/ProjectStatusBadge/ProjectStatusBadge.tsx @@ -12,6 +12,6 @@ export const ProjectStatusBadge = ({ status }: Props) => { return status === ProjectStatusEnum.Done ? ( {t.completed} ) : ( - {t.disabled} + {t.disabled} ); }; diff --git a/app/Dashboard/_components/LogoutModal/LogoutConfirm.tsx b/app/Dashboard/_components/LogoutModal/LogoutConfirm.tsx index 976ad9f8..1e581c1e 100644 --- a/app/Dashboard/_components/LogoutModal/LogoutConfirm.tsx +++ b/app/Dashboard/_components/LogoutModal/LogoutConfirm.tsx @@ -6,7 +6,7 @@ const texts = messages.logout.modal; export const LogoutConfirm = () => { return ( - {texts.confirmMessage} + {texts.confirmMessage} ); diff --git a/app/messages.ts b/app/messages.ts index 24a7c096..d22f3c17 100644 --- a/app/messages.ts +++ b/app/messages.ts @@ -310,21 +310,9 @@ export const messages = { }, }, login: { - loginFrom: { - title: 'به حساب کاربری خود وارد شوید', - description: 'خوش آمدید، لطفا اطلاعات خود را وارد کنید.', - emailInput: { - label: 'ایمیل', - placeholder: 'you@example.com', - }, - passwordInput: { - label: 'رمز عبور', - placeholder: 'رمز عبور', - }, - submitButton: { - text: 'ورود', - }, - }, + title: 'خوش آمدید', + desc: 'به حساب کاربری خود وارد شوید', + button: 'ورودی', }, householdDetail: { title: 'اطلاعات کلی خانوار', diff --git a/libs/design/Alert/Alert.tsx b/libs/design/Alert/Alert.tsx index 2c37c324..a85e9f14 100644 --- a/libs/design/Alert/Alert.tsx +++ b/libs/design/Alert/Alert.tsx @@ -16,7 +16,7 @@ const getStyles = ( ): Styles => { return theme => ({ message: { - color: params.type === 'error' ? theme.colors.errorDefault[6] : undefined, + color: params.type === 'error' ? theme.colors.error[6] : undefined, fontSize: 13, }, }); @@ -26,7 +26,7 @@ export const Alert = ({ type, message }: AlertProps) => { return ( : undefined} - color={type === 'error' ? 'red' : undefined} + color={type === 'error' ? 'error' : undefined} styles={getStyles({ type })} > {message} diff --git a/libs/design/Badge/Badge.stories.tsx b/libs/design/Badge/Badge.stories.tsx index 9c925545..868529cd 100644 --- a/libs/design/Badge/Badge.stories.tsx +++ b/libs/design/Badge/Badge.stories.tsx @@ -10,7 +10,7 @@ type Story = StoryObj; export const Default: Story = { args: { - children: 'این نباید باشه', + children: 'پیش‌فرض', }, }; @@ -24,7 +24,7 @@ export const Success: Story = { export const Warning: Story = { args: { status: 'warning', - children: 'عادی', + children: 'خطا', }, }; @@ -34,3 +34,10 @@ export const Error: Story = { children: 'اضطراری', }, }; + +export const Info: Story = { + args: { + status: 'info', + children: 'عادی', + }, +}; diff --git a/libs/design/Badge/Badge.tsx b/libs/design/Badge/Badge.tsx index 8921e15c..5be4dbe6 100644 --- a/libs/design/Badge/Badge.tsx +++ b/libs/design/Badge/Badge.tsx @@ -1,7 +1,7 @@ import type { MantineColor } from '@mantine/core'; import { Badge as MantineBadge } from '@mantine/core'; -export type BadgeStatus = 'disabled' | 'error' | 'success' | 'warning'; +export type BadgeStatus = 'error' | 'info' | 'neutral' | 'success' | 'warning'; export interface BadgeProps { children: string; @@ -12,13 +12,14 @@ const statusMap: Record< BadgeStatus, { color: MantineColor; bg?: MantineColor } > = { - error: { color: 'red' }, - warning: { color: 'orange' }, - success: { color: 'teal' }, - disabled: { color: 'gray', bg: 'gray.1' }, + error: { color: 'error', bg: 'error.4' }, + warning: { color: 'warning', bg: 'warning.4' }, + success: { color: 'success', bg: 'success.4' }, + neutral: { color: 'secondary', bg: 'bg.4' }, + info: { color: 'info', bg: 'info.4' }, }; -export const Badge = ({ children, status }: BadgeProps) => { +export const Badge = ({ children, status = 'neutral' }: BadgeProps) => { return ( > = theme => ({ breadcrumb: { - 'color': theme.colors.fgDefault[6], + 'color': theme.colors.fg[6], '&:hover': { - color: theme.colors.indigo, + color: theme.colors.primary[6], }, }, }); export const Breadcrumbs = ({ items }: Props) => { + const theme = useMantineTheme(); return ( } > - + {items.map(item => ( ; - -type Story = StoryObj; - -export const Default: Story = { - render: args => ( - تیتر} - > - متن - - ), -}; diff --git a/libs/design/DashboardCard/CollapsibleDashboardCard.tsx b/libs/design/DashboardCard/CollapsibleDashboardCard.tsx deleted file mode 100644 index 50c2ce38..00000000 --- a/libs/design/DashboardCard/CollapsibleDashboardCard.tsx +++ /dev/null @@ -1,50 +0,0 @@ -import { ChevronDownIcon } from '@camp/icons'; -import { ActionIcon, Box, Collapse } from '@mantine/core'; -import { useUncontrolled } from '@mantine/hooks'; - -import type { DashboardCardProps } from './DashboardCard'; -import { DashboardCard } from './DashboardCard'; - -export interface CollapsibleDashboardCardProps - extends Omit { - onToggle?: (newValue: boolean) => void; - header: React.ReactNode; - children?: React.ReactNode; - open?: boolean; -} - -export const CollapsibleDashboardCard = ({ - children, - onToggle, - open, - header, - ...props -}: CollapsibleDashboardCardProps) => { - const [value, setValue] = useUncontrolled({ - value: open, - onChange: onToggle, - }); - return ( - setValue(!value)} - right={header} - left={ - - ({ - color: theme.colors.fgDefault[6], - rotate: open ? '-180deg' : undefined, - transition: '300ms rotate', - width: 16, - height: 16, - })} - /> - - } - > - {children} - - ); -}; diff --git a/libs/design/DashboardCard/DashboardCard.stories.tsx b/libs/design/DashboardCard/DashboardCard.stories.tsx index 6863fc4f..83651215 100644 --- a/libs/design/DashboardCard/DashboardCard.stories.tsx +++ b/libs/design/DashboardCard/DashboardCard.stories.tsx @@ -5,7 +5,6 @@ import { DashboardTitle } from '../DashboardTitle'; import { DashboardCard } from './DashboardCard'; export default { - title: 'DashboardCard', component: DashboardCard, } as Meta; diff --git a/libs/design/DashboardCard/DashboardCard.tsx b/libs/design/DashboardCard/DashboardCard.tsx index 9ea41321..f4b057c7 100644 --- a/libs/design/DashboardCard/DashboardCard.tsx +++ b/libs/design/DashboardCard/DashboardCard.tsx @@ -1,29 +1,26 @@ import type { CardProps } from '@mantine/core'; import { Box, Card, Group, Stack } from '@mantine/core'; -export interface DashboardCardProps - extends Omit { - onHeaderClick?: React.MouseEventHandler; +interface DashboardCardInternalProps { right?: React.ReactNode; left?: React.ReactNode; children?: React.ReactNode; } +export interface DashboardCardProps + extends DashboardCardInternalProps, + Omit {} + export const DashboardCard = ({ right, left, children, - onHeaderClick, ...cardProps }: DashboardCardProps) => { return ( - + {right} {left} diff --git a/libs/design/DashboardCard/index.ts b/libs/design/DashboardCard/index.ts index 0ec6644f..32d639c0 100644 --- a/libs/design/DashboardCard/index.ts +++ b/libs/design/DashboardCard/index.ts @@ -1,2 +1 @@ -export * from './CollapsibleDashboardCard'; export * from './DashboardCard'; diff --git a/libs/design/DashboardTitle/DashboardTitle.tsx b/libs/design/DashboardTitle/DashboardTitle.tsx index 175d017c..efd006d8 100644 --- a/libs/design/DashboardTitle/DashboardTitle.tsx +++ b/libs/design/DashboardTitle/DashboardTitle.tsx @@ -6,7 +6,7 @@ interface Props { export const DashboardTitle = ({ children }: Props) => { return ( - + <Title order={4} color="fg" weight="bold"> {children} ); diff --git a/libs/design/DateInput/DateInput.tsx b/libs/design/DateInput/DateInput.tsx index 4465ad53..ceb69f4a 100644 --- a/libs/design/DateInput/DateInput.tsx +++ b/libs/design/DateInput/DateInput.tsx @@ -12,14 +12,10 @@ export const DateInput = forwardRef( return ( ({ direction: 'ltr', - color: theme.colors.secondaryDefault[6], + color: theme.colors.secondary[6], })} locale="fa" readOnly={readOnly} diff --git a/libs/design/DateSummery/DateSummery.tsx b/libs/design/DateSummery/DateSummery.tsx index ac1c00ca..05b9bb3f 100644 --- a/libs/design/DateSummery/DateSummery.tsx +++ b/libs/design/DateSummery/DateSummery.tsx @@ -12,7 +12,7 @@ const formatToPersian = (d: Date) => export const DateSummery = ({ startDate, endDate }: Props) => { const t = messages.projects.list.table.rows; return ( - + {startDate ? formatToPersian(startDate) : t.unknown} {endDate ? `- ${formatToPersian(endDate)}` : null} diff --git a/libs/design/DestructiveButton/DestructiveButton.tsx b/libs/design/DestructiveButton/DestructiveButton.tsx index 6b525062..d5d83c58 100644 --- a/libs/design/DestructiveButton/DestructiveButton.tsx +++ b/libs/design/DestructiveButton/DestructiveButton.tsx @@ -11,7 +11,7 @@ export const DestructiveButton = ({ onClick, ...rest }: Props) => {