diff --git a/public/16.png b/public/16.png index b6ba523..2ac6df7 100644 Binary files a/public/16.png and b/public/16.png differ diff --git a/public/180.png b/public/180.png index 353e08f..5e42415 100644 Binary files a/public/180.png and b/public/180.png differ diff --git a/public/32.png b/public/32.png index 46d4868..1b9bc09 100644 Binary files a/public/32.png and b/public/32.png differ diff --git a/public/48.png b/public/48.png index ceca153..00b807c 100644 Binary files a/public/48.png and b/public/48.png differ diff --git a/public/512.png b/public/512.png index 5df01fb..8ee4baf 100644 Binary files a/public/512.png and b/public/512.png differ diff --git a/src/components/DatePicker.tsx b/src/components/DatePicker.tsx index ef4383b..093639d 100644 --- a/src/components/DatePicker.tsx +++ b/src/components/DatePicker.tsx @@ -5,7 +5,7 @@ import persian_fa from 'react-date-object/locales/persian_fa'; import DateObject from 'react-date-object'; import { Calendar } from 'iconsax-react'; import { clx } from '@/helpers/utils'; -import { getIconColor } from '@/utils/colorUtils'; +import { useTheme } from '@/contexts/ThemeContext'; type Props = { onChange: (date: string) => void; @@ -19,7 +19,8 @@ type Props = { readOnly?: boolean; }; -const DatePickerComponent: FC = (props: Props) => { +const DatePickerComponent: FC = (props) => { + const { theme } = useTheme(); const [value, setValue] = useState(null); useEffect(() => { @@ -50,9 +51,7 @@ const DatePickerComponent: FC = (props: Props) => {
{ props.label && -
- {props.label} -
+
{props.label}
}
= (props: Props) => { calendarPosition="bottom-right" className={props.className} readOnly={props.readOnly} + style={{ + backgroundColor: theme === 'dark' ? 'var(--secondary)' : 'var(--card)', + color: theme === 'dark' ? 'var(--secondary-foreground)' : 'var(--card-foreground)', + border: `1px solid ${theme === 'dark' ? 'var(--border)' : 'var(--border)'}`, + borderRadius: '0.5rem', + padding: '0.5rem 2rem 0.5rem 0.5rem', + width: '100%', + fontSize: '0.875rem' + }} /> {props.error_text && props.error_text !== '' && (
@@ -77,7 +85,7 @@ const DatePickerComponent: FC = (props: Props) => {
diff --git a/src/components/DefaulModal.tsx b/src/components/DefaulModal.tsx index bfdd687..8cdfe42 100644 --- a/src/components/DefaulModal.tsx +++ b/src/components/DefaulModal.tsx @@ -1,5 +1,6 @@ import { FC, Fragment, ReactNode, useEffect } from 'react' import HeaderModal from './HeaderModal' +import { useTheme } from '@/contexts/ThemeContext' interface Props { open: boolean, @@ -11,6 +12,7 @@ interface Props { } const DefaulModal: FC = (props: Props) => { + const { theme } = useTheme(); useEffect(() => { if (props.open) { @@ -28,13 +30,16 @@ const DefaulModal: FC = (props: Props) => {
-
- +
{ props.isHeader && props.title_header &&
-
+
} diff --git a/src/components/Filters.tsx b/src/components/Filters.tsx index f56f4a5..9699158 100644 --- a/src/components/Filters.tsx +++ b/src/components/Filters.tsx @@ -6,6 +6,7 @@ import Select, { ItemsSelectType } from './Select'; import DefaulModal from './DefaulModal'; import moment from 'moment-jalaali' import Button from './Button'; +import { useTheme } from '@/contexts/ThemeContext'; export type DateFieldType = { type: 'date'; @@ -50,6 +51,7 @@ const Filters: FC = ({ fieldClassName = "flex flex-col sm:flex-row gap-3 md:gap-4 w-full md:w-auto", searchField = "search" }) => { + const { theme } = useTheme(); const [filters, setFilters] = useState({}); const [isFiltersOpen, setIsFiltersOpen] = useState(false); const [inputValues, setInputValues] = useState>({}); @@ -171,9 +173,15 @@ const Filters: FC = ({
{searchFieldObj && ( @@ -200,10 +208,10 @@ const Filters: FC = ({ isHeader={true} title_header="فیلتر کردن نتایج" > -
+
{otherFields.map(field => (
-