diff --git a/package.json b/package.json index 7611d0e84..c1c9c8718 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "@lit-labs/react": "^1.0.2", "@reduxjs/toolkit": "^1.7.1", "antd": "^4.22.4", - "antd-mask-input": "^0.1.15", + "antd-mask-input": "^2.0.7", "axios": "^0.24.0", "axios-mock-adapter": "^1.20.0", "country-list": "^2.2.0", @@ -34,7 +34,7 @@ "react": "^17.0.2", "react-country-flag": "^3.0.2", "react-dom": "^17.0.2", - "react-helmet": "^6.1.0", + "react-helmet-async": "^1.3.0", "react-i18next": "^11.11.4", "react-infinite-scroll-component": "^6.1.0", "react-insta-stories": "^2.3.0", diff --git a/src/App.tsx b/src/App.tsx index c4599c93d..d63562885 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,6 @@ import React from 'react'; import { ConfigProvider } from 'antd'; +import { HelmetProvider } from 'react-helmet-async'; import deDe from 'antd/lib/locale/de_DE'; import enUS from 'antd/lib/locale/en_US'; import GlobalStyle from './styles/GlobalStyle'; @@ -27,9 +28,11 @@ const App: React.FC = () => { <> - - - + + + + + ); }; diff --git a/src/api/covid.api.ts b/src/api/covid.api.ts index ae7a9d9ab..1e24ff6ab 100644 --- a/src/api/covid.api.ts +++ b/src/api/covid.api.ts @@ -1,20 +1,18 @@ import axios from 'axios'; +interface Data { + [key: string]: number; +} + export interface CoronaData { - updated_at: string; - date: string; - deaths: number; - confirmed: number; - recovered: number; - new_confirmed: number; - new_recovered: number; - new_deaths: number; - active: number; + cases: Data; + deaths: Data; + recovered: Data; } -export const getCovidData = async (): Promise<{ data: CoronaData[] } | undefined> => { +export const getCovidData = async (): Promise => { try { - const response = await axios.get<{ data: CoronaData[] }>('https://corona-api.com/timeline'); + const response = await axios.get('https://disease.sh/v3/covid-19/historical/all?lastdays=all'); return response.data; // eslint-disable-next-line @typescript-eslint/no-explicit-any diff --git a/src/components/apps/kanban/Card/Card.styles.ts b/src/components/apps/kanban/Card/Card.styles.ts index ae3c4e725..8dd0a1599 100644 --- a/src/components/apps/kanban/Card/Card.styles.ts +++ b/src/components/apps/kanban/Card/Card.styles.ts @@ -8,7 +8,7 @@ import { Footer, } from 'react-trello/dist/styles/Base'; import { DownOutlined } from '@ant-design/icons'; -import { Collapse, Menu } from 'antd'; +import { Collapse } from 'antd'; import InlineInput from 'react-trello/dist/widgets/InlineInput'; import { FONT_SIZE, FONT_WEIGHT } from '@app/styles/themes/constants'; @@ -95,14 +95,6 @@ export const CardFooter = styled(Footer)` justify-content: flex-start; `; -export const CardMenu = styled(Menu)` - box-shadow: var(--box-shadow-hover); -`; - -export const MenuItem = styled(Menu.Item)` - font-size: ${FONT_SIZE.xs}; -`; - export const Input = styled(InlineInput)` && { max-height: 28.125rem; diff --git a/src/components/apps/kanban/Card/Card.tsx b/src/components/apps/kanban/Card/Card.tsx index 3ad151525..6a9b548cb 100644 --- a/src/components/apps/kanban/Card/Card.tsx +++ b/src/components/apps/kanban/Card/Card.tsx @@ -23,27 +23,6 @@ interface CardProps { editable: boolean; } -interface EditPopoverProps { - onDelete: () => void; - onArchive: () => void; -} - -const EditPopover: React.FC = ({ onDelete, onArchive, ...props }) => { - const { t } = useTranslation(); - - return ( - - - {t('common.delete')} - - - - {t('kanban.archive')} - - - ); -}; - export const Card: React.FC = ({ style, onClick, @@ -81,6 +60,19 @@ export const Card: React.FC = ({ updateCard({ participants }); }; + const editPopoverItems = [ + { + key: '1', + label: t('common.delete'), + onClick: onDeleteCard, + }, + { + key: '2', + label: t('kanban.archive'), + onClick: onDeleteCard, + }, + ]; + return ( @@ -110,11 +102,7 @@ export const Card: React.FC = ({ )} - {current > 0 && ( - prev()}> - {t('forms.stepFormLabels.previous')} - - )} - + ); }; diff --git a/src/components/forms/StepForm/Steps/Step2.tsx b/src/components/forms/StepForm/Steps/Step2.tsx index dc6b91d27..bf77ad084 100644 --- a/src/components/forms/StepForm/Steps/Step2.tsx +++ b/src/components/forms/StepForm/Steps/Step2.tsx @@ -6,6 +6,11 @@ import { DatePicker } from '@app/components/common/pickers/DatePicker'; import { Select, Option } from '@app/components/common/selects/Select/Select'; import * as S from '../StepForm.styles'; import React from 'react'; +import styled from 'styled-components'; + +const Picker = styled(DatePicker)` + width: 100%; +`; export const Step2: React.FC = () => { const { t } = useTranslation(); @@ -60,7 +65,7 @@ export const Step2: React.FC = () => { label={t('forms.stepFormLabels.birthday')} rules={[{ required: true, message: t('forms.stepFormLabels.birthdayError') }]} > - + { { const [query, setQuery] = useState(''); const [components] = useState(configComponents); - const [isModalVisible, setModalVisible] = useState(false); - const [isOverlayVisible, setOverlayVisible] = useState(false); + const [isModalOpen, setModalOpen] = useState(false); + const [isOverlayOpen, setOverlayOpen] = useState(false); const sortedResults = query ? categoriesList.reduce((acc, current) => { @@ -36,31 +36,28 @@ export const HeaderSearch: React.FC = () => { : null; useEffect(() => { - setModalVisible(false); - setOverlayVisible(false); + setModalOpen(false); + setOverlayOpen(false); }, [pathname]); return ( <> {mobileOnly && ( <> - - - } disabled> - - - - - - {t('dropdowns.dangerItem')} - - ); + const basicItems = [ + { + key: '1', + label: t('dropdowns.firstItem'), + }, + { + key: '2', + label: `${t('dropdowns.secondItem')} ${t('dropdowns.disabled')}`, + icon: , + disabled: true, + }, + { + key: '3', + label: `${t('dropdowns.thirdItem')} ${t('dropdowns.disabled')}`, + disabled: true, + }, + { + key: '4', + label: t('dropdowns.dangerItem'), + danger: true, + }, + ]; + + const positionItems = [ + { + key: '1', + label: t('dropdowns.firstItem'), + }, + { + key: '2', + label: t('dropdowns.secondItem'), + }, + { + key: '3', + label: t('dropdowns.thirdItem'), + }, + ]; - const positionMenu = ( - - - - - - - - - - - - ); return ( <> {t('common.dropdown')} - + @@ -73,35 +70,35 @@ const DropdownsPage: React.FC = () => { - + - - + + - + - + - - + + - + - + - + {t('dropdowns.rightClick')} diff --git a/src/pages/uiComponentsPages/forms/AutoCompletesPage.tsx b/src/pages/uiComponentsPages/forms/AutoCompletesPage.tsx index 6c9ca5596..78db809ad 100644 --- a/src/pages/uiComponentsPages/forms/AutoCompletesPage.tsx +++ b/src/pages/uiComponentsPages/forms/AutoCompletesPage.tsx @@ -117,7 +117,7 @@ const AutoCompletesPage: React.FC = () => { diff --git a/src/pages/uiComponentsPages/forms/StepsPage.tsx b/src/pages/uiComponentsPages/forms/StepsPage.tsx index adbf1ea41..7deec1c86 100644 --- a/src/pages/uiComponentsPages/forms/StepsPage.tsx +++ b/src/pages/uiComponentsPages/forms/StepsPage.tsx @@ -2,7 +2,7 @@ import { useState } from 'react'; import { Col, Space } from 'antd'; import { useTranslation } from 'react-i18next'; import { UserOutlined, SolutionOutlined, LoadingOutlined, SmileOutlined } from '@ant-design/icons'; -import { Steps, Step } from '@app/components/common/Steps/Steps'; +import { Steps } from '@app/components/common/Steps/Steps'; import { PageTitle } from '@app/components/common/PageTitle/PageTitle'; import * as S from '@app/pages/uiComponentsPages//UIComponentsPage.styles'; @@ -19,46 +19,124 @@ const StepsPage: React.FC = () => { {t('common.steps')} - - - - - + - - - - - + - - } /> - } /> - } /> - } /> - + , + }, + { + title: t('steps.verification'), + icon: , + }, + { + title: t('steps.pay'), + icon: , + }, + { + title: t('steps.done'), + icon: , + }, + ]} + /> - - - - - + - - - - - - - - - - + + diff --git a/src/pages/uiComponentsPages/modals/ModalsPage.tsx b/src/pages/uiComponentsPages/modals/ModalsPage.tsx index 32cd36c76..bd817eb66 100644 --- a/src/pages/uiComponentsPages/modals/ModalsPage.tsx +++ b/src/pages/uiComponentsPages/modals/ModalsPage.tsx @@ -8,11 +8,11 @@ import * as S from '@app/pages/uiComponentsPages//UIComponentsPage.styles'; const ModalsPage: React.FC = () => { const { t } = useTranslation(); - const [isBasicModalVisible, setIsBasicModalVisible] = useState(false); - const [isSmallModalVisible, setIsSmallModalVisible] = useState(false); - const [isMiddleModalVisible, setIsMiddleModalVisible] = useState(false); - const [isLargeModalVisible, setIsLargeModalVisible] = useState(false); - const [isFullscreenModalVisible, setIsFullscreenModalVisible] = useState(false); + const [isBasicModalOpen, setIsBasicModalOpen] = useState(false); + const [isSmallModalOpen, setIsSmallModalOpen] = useState(false); + const [isMiddleModalOpen, setIsMiddleModalOpen] = useState(false); + const [isLargeModalOpen, setIsLargeModalOpen] = useState(false); + const [isFullscreenModalOpen, setIsFullscreenModalOpen] = useState(false); const success = () => { SuccessModal({ @@ -47,14 +47,14 @@ const ModalsPage: React.FC = () => { {t('common.modal')} - setIsBasicModalVisible(false)} - onCancel={() => setIsBasicModalVisible(false)} + open={isBasicModalOpen} + onOk={() => setIsBasicModalOpen(false)} + onCancel={() => setIsBasicModalOpen(false)} >

{t('modals.someContent')}

{t('modals.someContent')}

@@ -62,24 +62,24 @@ const ModalsPage: React.FC = () => {
- - - - setIsSmallModalVisible(false)} - onCancel={() => setIsSmallModalVisible(false)} + open={isSmallModalOpen} + onOk={() => setIsSmallModalOpen(false)} + onCancel={() => setIsSmallModalOpen(false)} size="small" >

{t('modals.someContent')}

@@ -89,9 +89,9 @@ const ModalsPage: React.FC = () => { setIsMiddleModalVisible(false)} - onCancel={() => setIsMiddleModalVisible(false)} + open={isMiddleModalOpen} + onOk={() => setIsMiddleModalOpen(false)} + onCancel={() => setIsMiddleModalOpen(false)} size="medium" >

{t('modals.someContent')}

@@ -101,9 +101,9 @@ const ModalsPage: React.FC = () => { setIsLargeModalVisible(false)} - onCancel={() => setIsLargeModalVisible(false)} + open={isLargeModalOpen} + onOk={() => setIsLargeModalOpen(false)} + onCancel={() => setIsLargeModalOpen(false)} size="large" >

{t('modals.someContent')}

@@ -113,9 +113,9 @@ const ModalsPage: React.FC = () => { setIsFullscreenModalVisible(false)} - onCancel={() => setIsFullscreenModalVisible(false)} + open={isFullscreenModalOpen} + onOk={() => setIsFullscreenModalOpen(false)} + onCancel={() => setIsFullscreenModalOpen(false)} width={'100%'} >

{t('modals.someContent')}

diff --git a/src/pages/uiComponentsPages/modals/PopconfirmsPage.tsx b/src/pages/uiComponentsPages/modals/PopconfirmsPage.tsx index f80da1b17..ac6bac606 100644 --- a/src/pages/uiComponentsPages/modals/PopconfirmsPage.tsx +++ b/src/pages/uiComponentsPages/modals/PopconfirmsPage.tsx @@ -20,7 +20,7 @@ const AsyncButton = styled(Button)` const PopconfirmsPage: React.FC = () => { const { t } = useTranslation(); - const [visible, setVisible] = useState(false); + const [open, setOpen] = useState(false); const [confirmLoading, setConfirmLoading] = useState(false); const text = t('popconfirm.content'); @@ -32,7 +32,7 @@ const PopconfirmsPage: React.FC = () => { const handleOk = () => { setConfirmLoading(true); setTimeout(() => { - setVisible(false); + setOpen(false); setConfirmLoading(false); }, 2000); }; @@ -169,12 +169,12 @@ const PopconfirmsPage: React.FC = () => { setVisible(false)} + onCancel={() => setOpen(false)} > - setVisible(true)}> + setOpen(true)}> {t('popconfirm.openAsync')} diff --git a/src/pages/uiComponentsPages/navigation/BreadcrumbsPage.tsx b/src/pages/uiComponentsPages/navigation/BreadcrumbsPage.tsx index d8ba852d5..504585fa4 100644 --- a/src/pages/uiComponentsPages/navigation/BreadcrumbsPage.tsx +++ b/src/pages/uiComponentsPages/navigation/BreadcrumbsPage.tsx @@ -3,10 +3,8 @@ import { Col, Space } from 'antd'; import { useTranslation } from 'react-i18next'; import { useLocation } from 'react-router-dom'; import { HomeOutlined, UserOutlined } from '@ant-design/icons'; -import { Button } from '@app/components/common/buttons/Button/Button'; import { Breadcrumb, BreadcrumbItem } from '@app/components/common/Breadcrumb/Breadcrumb'; import { PageTitle } from '@app/components/common/PageTitle/PageTitle'; -import { Menu, MenuItem } from '@app/components/common/Menu/Menu'; import * as S from '@app/pages/uiComponentsPages//UIComponentsPage.styles'; const BreadcrumbsPage: React.FC = () => { @@ -14,25 +12,21 @@ const BreadcrumbsPage: React.FC = () => { const { pathname } = useLocation(); - const menu = ( - - - - - - - - - - - - ); + const menu = [ + { + key: '1', + label: t('breadcrumbs.general'), + }, + { + key: '2', + label: t('breadcrumbs.layout'), + }, + { + key: '3', + label: t('breadcrumbs.navigation'), + }, + ]; + return ( <> {t('common.breadcrumbs')} @@ -71,7 +65,7 @@ const BreadcrumbsPage: React.FC = () => { {t('breadcrumbs.antd')} {t('breadcrumbs.component')} - {t('breadcrumbs.general')} + {t('breadcrumbs.general')} {t('breadcrumbs.button')} diff --git a/src/pages/uiComponentsPages/navigation/TabsPage.tsx b/src/pages/uiComponentsPages/navigation/TabsPage.tsx index 2766891e7..2a8558692 100644 --- a/src/pages/uiComponentsPages/navigation/TabsPage.tsx +++ b/src/pages/uiComponentsPages/navigation/TabsPage.tsx @@ -3,7 +3,7 @@ import { Col, Space } from 'antd'; import { useTranslation } from 'react-i18next'; import { AppleOutlined, AndroidOutlined } from '@ant-design/icons'; import { RadioGroup, RadioButton, RadioChangeEvent } from '@app/components/common/Radio/Radio'; -import { Tabs, TabPane } from '@app/components/common/Tabs/Tabs'; +import { Tabs } from '@app/components/common/Tabs/Tabs'; import { PageTitle } from '@app/components/common/PageTitle/PageTitle'; import * as S from '@app/pages/uiComponentsPages//UIComponentsPage.styles'; @@ -20,56 +20,76 @@ const TabsPage: React.FC = () => { {t('common.tabs')} - - - {t('tabs.tabContent')} 1 - - - {t('tabs.tabContent')} 2 - - - {t('tabs.tabContent')} 3 - - + - - - {t('tabs.tabContent')} 1 - - - {t('tabs.tabContent')} 2 - - - {t('tabs.tabContent')} 3 - - + - - - - {t('tabs.tab')} 1 - - } - key="1" - > - {t('tabs.tabContent')} 1 - - - - {t('tabs.tab')} 2 - - } - key="2" - > - {t('tabs.tabContent')} 2 - - + + + {t('tabs.tab')} 1 + + ), + children: `${t('tabs.tabContent')} 1`, + }, + { + key: '2', + label: ( + + + {t('tabs.tab')} 2 + + ), + children: `${t('tabs.tabContent')} 2`, + }, + ]} + /> @@ -82,17 +102,26 @@ const TabsPage: React.FC = () => { {t('tabs.right')} - - - {t('tabs.tabContent')} 1 - - - {t('tabs.tabContent')} 2 - - - {t('tabs.tabContent')} 3 - - + diff --git a/src/styles/GlobalStyle.ts b/src/styles/GlobalStyle.ts index 5b848e0af..e0c9d3b04 100644 --- a/src/styles/GlobalStyle.ts +++ b/src/styles/GlobalStyle.ts @@ -39,7 +39,7 @@ export default createGlobalStyle` } } - .search-dropdown { + .search-overlay { box-shadow: var(--box-shadow); @media only screen and ${media.xs} and (max-width: ${BREAKPOINTS.md - 0.02}px) { @@ -48,7 +48,7 @@ export default createGlobalStyle` } @media only screen and ${media.md} { - max-width: 323px; + width: 323px; } } @@ -59,10 +59,6 @@ export default createGlobalStyle` } } - .d-none { - display: none; - } - .ant-picker-cell { color: var(--text-main-color); } diff --git a/yarn.lock b/yarn.lock index eeb231e4c..df17e2355 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3743,13 +3743,15 @@ __metadata: languageName: node linkType: hard -"antd-mask-input@npm:^0.1.15": - version: 0.1.15 - resolution: "antd-mask-input@npm:0.1.15" +"antd-mask-input@npm:^2.0.7": + version: 2.0.7 + resolution: "antd-mask-input@npm:2.0.7" + dependencies: + imask: 6.4.2 peerDependencies: - antd: ">=3.0.0" + antd: ">=4.19.0" react: ">=16.0.0" - checksum: 29d7a98babbb472f60e3bffe6244203a8c6c4b73839aba395382137b6442c2553e0abdd57e94a65ac0ef908830ed3784eb907d41756d8368de6d7b200f7f7b5b + checksum: 069fd023d90a6d410cf7740fc02044c10f618835a0e5a864d43175d5f4dc8e843c9d7d81f7cae2b69034999ddefe04d9f233133ec426329b4f4863de3905b948 languageName: node linkType: hard @@ -9204,6 +9206,13 @@ __metadata: languageName: node linkType: hard +"imask@npm:6.4.2": + version: 6.4.2 + resolution: "imask@npm:6.4.2" + checksum: a713aec87f23b1b095aa3a515311222346211dc544bfcae25d4a0aa3bca9a8c13a3269985d8b913cd9af013b733cdae7f81278988d04a9a34b173744b081c0e9 + languageName: node + linkType: hard + "immer@npm:8.0.1": version: 8.0.1 resolution: "immer@npm:8.0.1" @@ -11062,7 +11071,7 @@ __metadata: "@typescript-eslint/eslint-plugin": ^5.10.0 "@typescript-eslint/parser": ^5.8.0 antd: ^4.22.4 - antd-mask-input: ^0.1.15 + antd-mask-input: ^2.0.7 axios: ^0.24.0 axios-mock-adapter: ^1.20.0 country-list: ^2.2.0 @@ -11091,7 +11100,7 @@ __metadata: react: ^17.0.2 react-country-flag: ^3.0.2 react-dom: ^17.0.2 - react-helmet: ^6.1.0 + react-helmet-async: ^1.3.0 react-i18next: ^11.11.4 react-infinite-scroll-component: ^6.1.0 react-insta-stories: ^2.3.0 @@ -15016,24 +15025,26 @@ __metadata: languageName: node linkType: hard -"react-fast-compare@npm:^3.1.1": +"react-fast-compare@npm:^3.2.0": version: 3.2.0 resolution: "react-fast-compare@npm:3.2.0" checksum: 8ef272c825ae329f61633ce4ce7f15aa5b84e5214d88bc0823880236e03e985a13195befa2c7a4eda7db3b017dc7985729152d88445823f652403cf36c2b86aa languageName: node linkType: hard -"react-helmet@npm:^6.1.0": - version: 6.1.0 - resolution: "react-helmet@npm:6.1.0" +"react-helmet-async@npm:^1.3.0": + version: 1.3.0 + resolution: "react-helmet-async@npm:1.3.0" dependencies: - object-assign: ^4.1.1 + "@babel/runtime": ^7.12.5 + invariant: ^2.2.4 prop-types: ^15.7.2 - react-fast-compare: ^3.1.1 - react-side-effect: ^2.1.0 + react-fast-compare: ^3.2.0 + shallowequal: ^1.1.0 peerDependencies: - react: ">=16.3.0" - checksum: a4998479dab7fc1c2799eddefb1870a9d881b5f71cfdf97979a9882e42f4bb50402d55335f308f461e735e01a06f46b16cc7b4e6bcb22c7a4a6f85a753c5c106 + react: ^16.6.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.6.0 || ^17.0.0 || ^18.0.0 + checksum: 7ca7e47f8af14ea186688b512a87ab912bf6041312b297f92516341b140b3f0f8aedf5a44d226d99e69ed067b0cc106e38aeb9c9b738ffcc63d10721c844db90 languageName: node linkType: hard @@ -15317,15 +15328,6 @@ __metadata: languageName: node linkType: hard -"react-side-effect@npm:^2.1.0": - version: 2.1.2 - resolution: "react-side-effect@npm:2.1.2" - peerDependencies: - react: ^16.3.0 || ^17.0.0 || ^18.0.0 - checksum: c5eb1f42b464fb093bca59aaae0f1b2060373a2aaff95275b8781493628cdbbb6acdd6014e7883782c65c361f35a30f28cc515d68a1263ddb39cbbc47110be53 - languageName: node - linkType: hard - "react-simple-maps@npm:^2.3.0": version: 2.3.0 resolution: "react-simple-maps@npm:2.3.0"