diff options
author | Vijay A <vraravam@users.noreply.github.com> | 2024-03-22 02:33:33 +0530 |
---|---|---|
committer | Vijay Aravamudhan <vraravam@users.noreply.github.com> | 2024-03-21 21:24:35 +0000 |
commit | 2f3f2ae7f098376f535e5aa993c9eedc14e36f5d (patch) | |
tree | d919bda212744493a7b66c2e91a75455421d62cc /src/components/ui | |
parent | Upgrade electron to '29.1.5' (diff) | |
download | ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.tar.gz ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.tar.zst ferdium-app-2f3f2ae7f098376f535e5aa993c9eedc14e36f5d.zip |
Upgrade node modules
Diffstat (limited to 'src/components/ui')
37 files changed, 167 insertions, 133 deletions
diff --git a/src/components/ui/AppLoader/index.tsx b/src/components/ui/AppLoader/index.tsx index 4b5828ef4..a2133e174 100644 --- a/src/components/ui/AppLoader/index.tsx +++ b/src/components/ui/AppLoader/index.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
3 | import withStyles, { WithStylesProps } from 'react-jss'; | 2 | import { Component, type ReactElement } from 'react'; |
4 | import { Theme } from '../../../themes'; | 3 | import withStyles, { type WithStylesProps } from 'react-jss'; |
5 | import FullscreenLoader from '../FullscreenLoader'; | ||
6 | import shuffleArray from '../../../helpers/array-helpers'; | 4 | import shuffleArray from '../../../helpers/array-helpers'; |
5 | import type { Theme } from '../../../themes'; | ||
6 | import FullscreenLoader from '../FullscreenLoader'; | ||
7 | 7 | ||
8 | import styles from './styles'; | 8 | import styles from './styles'; |
9 | 9 | ||
diff --git a/src/components/ui/FAB.tsx b/src/components/ui/FAB.tsx index acb0f690e..b4eeace8b 100644 --- a/src/components/ui/FAB.tsx +++ b/src/components/ui/FAB.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component, ReactElement, ReactNode } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { Component, type ReactElement, type ReactNode } from 'react'; | ||
5 | 5 | ||
6 | interface IProps { | 6 | interface IProps { |
7 | className: string; | 7 | className: string; |
diff --git a/src/components/ui/FullscreenLoader/index.tsx b/src/components/ui/FullscreenLoader/index.tsx index 09c1d5fbb..40b04abe8 100644 --- a/src/components/ui/FullscreenLoader/index.tsx +++ b/src/components/ui/FullscreenLoader/index.tsx | |||
@@ -1,11 +1,11 @@ | |||
1 | import { Component, ReactElement, ReactNode } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import { Component, type ReactElement, type ReactNode } from 'react'; | ||
4 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
5 | import type { Theme } from '../../../themes'; | ||
6 | import { H1 } from '../headline'; | ||
5 | import Loader from '../loader/index'; | 7 | import Loader from '../loader/index'; |
6 | import styles from './styles'; | 8 | import styles from './styles'; |
7 | import { H1 } from '../headline'; | ||
8 | import { Theme } from '../../../themes'; | ||
9 | 9 | ||
10 | interface IProps extends WithStylesProps<typeof styles> { | 10 | interface IProps extends WithStylesProps<typeof styles> { |
11 | className?: string; | 11 | className?: string; |
diff --git a/src/components/ui/InfoBar.tsx b/src/components/ui/InfoBar.tsx index f3f1adbe7..5fd27f61a 100644 --- a/src/components/ui/InfoBar.tsx +++ b/src/components/ui/InfoBar.tsx | |||
@@ -1,14 +1,18 @@ | |||
1 | import { Component, MouseEventHandler, ReactNode } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 2 | import { observer } from 'mobx-react'; |
3 | import { Component, type MouseEventHandler, type ReactNode } from 'react'; | ||
4 | import { | ||
5 | type WrappedComponentProps, | ||
6 | defineMessages, | ||
7 | injectIntl, | ||
8 | } from 'react-intl'; | ||
5 | 9 | ||
6 | import { mdiClose } from '@mdi/js'; | 10 | import { mdiClose } from '@mdi/js'; |
7 | import { noop } from 'lodash'; | 11 | import { noop } from 'lodash'; |
8 | import Loader from './loader/index'; | 12 | import { DEFAULT_LOADER_COLOR } from '../../config'; |
9 | import Appear from './effects/Appear'; | 13 | import Appear from './effects/Appear'; |
10 | import Icon from './icon'; | 14 | import Icon from './icon'; |
11 | import { DEFAULT_LOADER_COLOR } from '../../config'; | 15 | import Loader from './loader/index'; |
12 | 16 | ||
13 | const messages = defineMessages({ | 17 | const messages = defineMessages({ |
14 | hide: { | 18 | hide: { |
diff --git a/src/components/ui/Infobox.tsx b/src/components/ui/Infobox.tsx index 14e1a581c..fc88c4654 100644 --- a/src/components/ui/Infobox.tsx +++ b/src/components/ui/Infobox.tsx | |||
@@ -1,12 +1,21 @@ | |||
1 | import { Component, MouseEventHandler, ReactElement, ReactNode } from 'react'; | ||
2 | import classnames from 'classnames'; | ||
3 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | ||
4 | import { mdiAlert, mdiCheckboxMarkedCircleOutline, mdiClose } from '@mdi/js'; | 1 | import { mdiAlert, mdiCheckboxMarkedCircleOutline, mdiClose } from '@mdi/js'; |
2 | import classnames from 'classnames'; | ||
5 | import { noop } from 'lodash'; | 3 | import { noop } from 'lodash'; |
6 | import { observer } from 'mobx-react'; | 4 | import { observer } from 'mobx-react'; |
7 | import Loader from './loader/index'; | 5 | import { |
8 | import Icon from './icon'; | 6 | Component, |
7 | type MouseEventHandler, | ||
8 | type ReactElement, | ||
9 | type ReactNode, | ||
10 | } from 'react'; | ||
11 | import { | ||
12 | type WrappedComponentProps, | ||
13 | defineMessages, | ||
14 | injectIntl, | ||
15 | } from 'react-intl'; | ||
9 | import { DEFAULT_LOADER_COLOR } from '../../config'; | 16 | import { DEFAULT_LOADER_COLOR } from '../../config'; |
17 | import Icon from './icon'; | ||
18 | import Loader from './loader/index'; | ||
10 | 19 | ||
11 | const icons = { | 20 | const icons = { |
12 | 'checkbox-marked-circle-outline': mdiCheckboxMarkedCircleOutline, | 21 | 'checkbox-marked-circle-outline': mdiCheckboxMarkedCircleOutline, |
diff --git a/src/components/ui/Link.tsx b/src/components/ui/Link.tsx index f9fdd57f9..816798d79 100644 --- a/src/components/ui/Link.tsx +++ b/src/components/ui/Link.tsx | |||
@@ -1,9 +1,14 @@ | |||
1 | import { Component, CSSProperties, ReactNode, MouseEvent } from 'react'; | ||
2 | import { inject, observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { inject, observer } from 'mobx-react'; | ||
3 | import { | ||
4 | type CSSProperties, | ||
5 | Component, | ||
6 | type MouseEvent, | ||
7 | type ReactNode, | ||
8 | } from 'react'; | ||
9 | import type { StoresProps } from '../../@types/ferdium-components.types'; | ||
4 | import matchRoute from '../../helpers/routing-helpers'; | 10 | import matchRoute from '../../helpers/routing-helpers'; |
5 | import { openExternalUrl } from '../../helpers/url-helpers'; | 11 | import { openExternalUrl } from '../../helpers/url-helpers'; |
6 | import { StoresProps } from '../../@types/ferdium-components.types'; | ||
7 | 12 | ||
8 | interface IProps extends Partial<StoresProps> { | 13 | interface IProps extends Partial<StoresProps> { |
9 | children: ReactNode; | 14 | children: ReactNode; |
@@ -54,7 +59,6 @@ class Link extends Component<IProps> { | |||
54 | }); | 59 | }); |
55 | 60 | ||
56 | return ( | 61 | return ( |
57 | // biome-ignore lint/a11y/useValidAnchor: <explanation> | ||
58 | <a | 62 | <a |
59 | href={router.history.createHref(to)} | 63 | href={router.history.createHref(to)} |
60 | className={linkClasses} | 64 | className={linkClasses} |
diff --git a/src/components/ui/Modal/index.tsx b/src/components/ui/Modal/index.tsx index 154beef0c..15326a289 100644 --- a/src/components/ui/Modal/index.tsx +++ b/src/components/ui/Modal/index.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component, ReactNode } from 'react'; | ||
2 | import ReactModal from 'react-modal'; | ||
3 | import classnames from 'classnames'; | ||
4 | import injectCSS, { WithStylesProps } from 'react-jss'; | ||
5 | import { mdiClose } from '@mdi/js'; | 1 | import { mdiClose } from '@mdi/js'; |
2 | import classnames from 'classnames'; | ||
3 | import { Component, type ReactNode } from 'react'; | ||
4 | import injectCSS, { type WithStylesProps } from 'react-jss'; | ||
5 | import ReactModal from 'react-modal'; | ||
6 | 6 | ||
7 | import Icon from '../icon'; | 7 | import Icon from '../icon'; |
8 | import styles from './styles'; | 8 | import styles from './styles'; |
diff --git a/src/components/ui/Radio.tsx b/src/components/ui/Radio.tsx index 901958c78..b556eb4ca 100644 --- a/src/components/ui/Radio.tsx +++ b/src/components/ui/Radio.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import FieldInterface from 'mobx-react-form/lib/models/FieldInterface'; | 2 | import { observer } from 'mobx-react'; |
3 | import type FieldInterface from 'mobx-react-form/lib/models/FieldInterface'; | ||
4 | import { Component } from 'react'; | ||
5 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 5 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
6 | import Error from './error'; | 6 | import Error from './error'; |
7 | 7 | ||
diff --git a/src/components/ui/SearchInput.tsx b/src/components/ui/SearchInput.tsx index b2caaa1de..2e70d1b35 100644 --- a/src/components/ui/SearchInput.tsx +++ b/src/components/ui/SearchInput.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { ChangeEvent, Component, ReactElement } from 'react'; | 1 | import { mdiCloseCircleOutline, mdiMagnify } from '@mdi/js'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
4 | import { debounce, noop } from 'lodash'; | 3 | import { debounce, noop } from 'lodash'; |
5 | import { mdiCloseCircleOutline, mdiMagnify } from '@mdi/js'; | 4 | import { observer } from 'mobx-react'; |
5 | import { type ChangeEvent, Component, type ReactElement } from 'react'; | ||
6 | import Icon from './icon'; | 6 | import Icon from './icon'; |
7 | 7 | ||
8 | interface IProps { | 8 | interface IProps { |
diff --git a/src/components/ui/Select.tsx b/src/components/ui/Select.tsx index a2ed4216f..4abed849d 100644 --- a/src/components/ui/Select.tsx +++ b/src/components/ui/Select.tsx | |||
@@ -1,14 +1,14 @@ | |||
1 | import classnames from 'classnames'; | ||
2 | import { observer } from 'mobx-react'; | ||
1 | import { | 3 | import { |
2 | createRef, | 4 | type ChangeEvent, |
3 | Component, | 5 | Component, |
4 | ReactElement, | 6 | type ReactElement, |
5 | RefObject, | 7 | type ReactNode, |
6 | ChangeEvent, | 8 | type RefObject, |
7 | ReactNode, | 9 | createRef, |
8 | } from 'react'; | 10 | } from 'react'; |
9 | import { observer } from 'mobx-react'; | 11 | import type { Field } from '../../@types/mobx-form.types'; |
10 | import classnames from 'classnames'; | ||
11 | import { Field } from '../../@types/mobx-form.types'; | ||
12 | 12 | ||
13 | interface IProps { | 13 | interface IProps { |
14 | field: Field; | 14 | field: Field; |
diff --git a/src/components/ui/ServiceIcon.tsx b/src/components/ui/ServiceIcon.tsx index 6920611d0..03a345c23 100644 --- a/src/components/ui/ServiceIcon.tsx +++ b/src/components/ui/ServiceIcon.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import { Component, ReactNode } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
4 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
5 | import ServiceModel from '../../models/Service'; | 2 | import { observer } from 'mobx-react'; |
3 | import { Component, type ReactNode } from 'react'; | ||
4 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
5 | import type ServiceModel from '../../models/Service'; | ||
6 | 6 | ||
7 | const styles = theme => ({ | 7 | const styles = theme => ({ |
8 | root: { | 8 | root: { |
diff --git a/src/components/ui/Slider.tsx b/src/components/ui/Slider.tsx index aa351ccd2..4f22290ef 100644 --- a/src/components/ui/Slider.tsx +++ b/src/components/ui/Slider.tsx | |||
@@ -1,7 +1,7 @@ | |||
1 | import { ChangeEvent, Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import { noop } from 'lodash'; | 2 | import { noop } from 'lodash'; |
3 | import { observer } from 'mobx-react'; | ||
4 | import { type ChangeEvent, Component, type ReactElement } from 'react'; | ||
5 | 5 | ||
6 | interface IProps { | 6 | interface IProps { |
7 | field: any; | 7 | field: any; |
diff --git a/src/components/ui/StatusBarTargetUrl.tsx b/src/components/ui/StatusBarTargetUrl.tsx index d969267eb..92cb6c36d 100644 --- a/src/components/ui/StatusBarTargetUrl.tsx +++ b/src/components/ui/StatusBarTargetUrl.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Component } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { observer } from 'mobx-react'; | ||
3 | import { Component } from 'react'; | ||
4 | import Appear from './effects/Appear'; | 4 | import Appear from './effects/Appear'; |
5 | 5 | ||
6 | interface IProps { | 6 | interface IProps { |
diff --git a/src/components/ui/Tabs/TabItem.tsx b/src/components/ui/Tabs/TabItem.tsx index 55dee42c6..df99a8bfb 100644 --- a/src/components/ui/Tabs/TabItem.tsx +++ b/src/components/ui/Tabs/TabItem.tsx | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Fragment, ReactElement } from 'react'; | 1 | import { Fragment, type ReactElement } from 'react'; |
2 | 2 | ||
3 | export interface IProps { | 3 | export interface IProps { |
4 | children: | 4 | children: |
diff --git a/src/components/ui/Tabs/Tabs.tsx b/src/components/ui/Tabs/Tabs.tsx index d7f75c8b8..a5ec148aa 100644 --- a/src/components/ui/Tabs/Tabs.tsx +++ b/src/components/ui/Tabs/Tabs.tsx | |||
@@ -1,7 +1,12 @@ | |||
1 | import { Children, Component, ReactElement, ReactPortal } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
4 | import { IProps as TabItemProps } from './TabItem'; | 2 | import { observer } from 'mobx-react'; |
3 | import { | ||
4 | Children, | ||
5 | Component, | ||
6 | type ReactElement, | ||
7 | type ReactPortal, | ||
8 | } from 'react'; | ||
9 | import type { IProps as TabItemProps } from './TabItem'; | ||
5 | 10 | ||
6 | interface IProps { | 11 | interface IProps { |
7 | children: | 12 | children: |
diff --git a/src/components/ui/WebviewLoader/index.tsx b/src/components/ui/WebviewLoader/index.tsx index c4e9c724c..53e10d3b9 100644 --- a/src/components/ui/WebviewLoader/index.tsx +++ b/src/components/ui/WebviewLoader/index.tsx | |||
@@ -1,7 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | 1 | import { observer } from 'mobx-react'; |
3 | import injectSheet, { WithStylesProps } from 'react-jss'; | 2 | import { Component, type ReactElement } from 'react'; |
4 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 3 | import { |
4 | type WrappedComponentProps, | ||
5 | defineMessages, | ||
6 | injectIntl, | ||
7 | } from 'react-intl'; | ||
8 | import injectSheet, { type WithStylesProps } from 'react-jss'; | ||
5 | import FullscreenLoader from '../FullscreenLoader'; | 9 | import FullscreenLoader from '../FullscreenLoader'; |
6 | 10 | ||
7 | const messages = defineMessages({ | 11 | const messages = defineMessages({ |
diff --git a/src/components/ui/badge/ProBadge.tsx b/src/components/ui/badge/ProBadge.tsx index a5947d3a8..fd5752ed0 100644 --- a/src/components/ui/badge/ProBadge.tsx +++ b/src/components/ui/badge/ProBadge.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import { mdiStar } from '@mdi/js'; | 1 | import { mdiStar } from '@mdi/js'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { Component } from 'react'; | 3 | import { Component } from 'react'; |
4 | import injectStyle, { WithStylesProps } from 'react-jss'; | 4 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
5 | 5 | ||
6 | import { Theme } from '../../../themes'; | 6 | import type { Theme } from '../../../themes'; |
7 | import Icon from '../icon'; | 7 | import Icon from '../icon'; |
8 | import Badge from './index'; | 8 | import Badge from './index'; |
9 | 9 | ||
diff --git a/src/components/ui/badge/index.tsx b/src/components/ui/badge/index.tsx index 44fbf2d4a..e464c07ec 100644 --- a/src/components/ui/badge/index.tsx +++ b/src/components/ui/badge/index.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, ReactNode } from 'react'; | 2 | import { Component, type ReactNode } from 'react'; |
3 | import injectStyle, { WithStylesProps } from 'react-jss'; | 3 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import { Theme } from '../../../themes'; | 5 | import type { Theme } from '../../../themes'; |
6 | 6 | ||
7 | const badgeStyles = (theme: Theme) => { | 7 | const badgeStyles = (theme: Theme) => { |
8 | const styles = {}; | 8 | const styles = {}; |
diff --git a/src/components/ui/button/index.tsx b/src/components/ui/button/index.tsx index 3247072a9..5c606f274 100644 --- a/src/components/ui/button/index.tsx +++ b/src/components/ui/button/index.tsx | |||
@@ -1,14 +1,14 @@ | |||
1 | /* eslint-disable no-use-before-define */ | 1 | /* eslint-disable no-use-before-define */ |
2 | import Icon from '@mdi/react'; | 2 | import Icon from '@mdi/react'; |
3 | import classnames from 'classnames'; | 3 | import classnames from 'classnames'; |
4 | import { Property } from 'csstype'; | 4 | import type { Property } from 'csstype'; |
5 | import { noop } from 'lodash'; | 5 | import { noop } from 'lodash'; |
6 | import { Component, MouseEventHandler } from 'react'; | 6 | import { Component, type MouseEventHandler } from 'react'; |
7 | import withStyles, { WithStylesProps } from 'react-jss'; | 7 | import withStyles, { type WithStylesProps } from 'react-jss'; |
8 | import Loader from '../loader/index'; | ||
9 | import { Theme } from '../../../themes'; | ||
10 | import { IFormField } from '../typings/generic'; | ||
11 | import { DEFAULT_LOADER_COLOR } from '../../../config'; | 8 | import { DEFAULT_LOADER_COLOR } from '../../../config'; |
9 | import type { Theme } from '../../../themes'; | ||
10 | import Loader from '../loader/index'; | ||
11 | import type { IFormField } from '../typings/generic'; | ||
12 | 12 | ||
13 | type ButtonType = | 13 | type ButtonType = |
14 | | 'primary' | 14 | | 'primary' |
@@ -206,7 +206,6 @@ class ButtonComponent extends Component<IProps, IState> { | |||
206 | ); | 206 | ); |
207 | 207 | ||
208 | const wrapperComponent = href ? ( | 208 | const wrapperComponent = href ? ( |
209 | // biome-ignore lint/a11y/useValidAnchor: <explanation> | ||
210 | <a | 209 | <a |
211 | href={href} | 210 | href={href} |
212 | target={target} | 211 | target={target} |
diff --git a/src/components/ui/colorPickerInput/index.tsx b/src/components/ui/colorPickerInput/index.tsx index 39fd0220a..4870a3675 100644 --- a/src/components/ui/colorPickerInput/index.tsx +++ b/src/components/ui/colorPickerInput/index.tsx | |||
@@ -1,15 +1,15 @@ | |||
1 | import classnames from 'classnames'; | ||
2 | import { noop } from 'lodash'; | ||
3 | import { observer } from 'mobx-react'; | ||
1 | import { | 4 | import { |
2 | ChangeEvent, | 5 | type ChangeEvent, |
3 | Component, | 6 | Component, |
7 | type InputHTMLAttributes, | ||
8 | type RefObject, | ||
4 | createRef, | 9 | createRef, |
5 | InputHTMLAttributes, | ||
6 | RefObject, | ||
7 | } from 'react'; | 10 | } from 'react'; |
8 | import { observer } from 'mobx-react'; | 11 | import { type Color, type ColorResult, SliderPicker } from 'react-color'; |
9 | import classnames from 'classnames'; | 12 | import type { FormFields } from '../../../@types/mobx-form.types'; |
10 | import { Color, ColorResult, SliderPicker } from 'react-color'; | ||
11 | import { noop } from 'lodash'; | ||
12 | import { FormFields } from '../../../@types/mobx-form.types'; | ||
13 | 13 | ||
14 | interface IProps extends InputHTMLAttributes<HTMLInputElement>, FormFields { | 14 | interface IProps extends InputHTMLAttributes<HTMLInputElement>, FormFields { |
15 | onColorChange: (event: ChangeEvent<HTMLInputElement>) => void; | 15 | onColorChange: (event: ChangeEvent<HTMLInputElement>) => void; |
diff --git a/src/components/ui/effects/Appear.tsx b/src/components/ui/effects/Appear.tsx index 06f63a029..c32c339fd 100644 --- a/src/components/ui/effects/Appear.tsx +++ b/src/components/ui/effects/Appear.tsx | |||
@@ -1,4 +1,4 @@ | |||
1 | import { ReactElement, ReactNode, useEffect, useState } from 'react'; | 1 | import { type ReactElement, type ReactNode, useEffect, useState } from 'react'; |
2 | import { CSSTransition, TransitionGroup } from 'react-transition-group'; | 2 | import { CSSTransition, TransitionGroup } from 'react-transition-group'; |
3 | 3 | ||
4 | interface IProps { | 4 | interface IProps { |
diff --git a/src/components/ui/error/index.tsx b/src/components/ui/error/index.tsx index 01fb5ca27..d0008529f 100644 --- a/src/components/ui/error/index.tsx +++ b/src/components/ui/error/index.tsx | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Classes } from 'jss'; | 1 | import type { Classes } from 'jss'; |
2 | import { Component } from 'react'; | 2 | import { Component } from 'react'; |
3 | import injectSheet from 'react-jss'; | 3 | import injectSheet from 'react-jss'; |
4 | 4 | ||
diff --git a/src/components/ui/error/styles.ts b/src/components/ui/error/styles.ts index 9da95705a..ac781052f 100644 --- a/src/components/ui/error/styles.ts +++ b/src/components/ui/error/styles.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Theme } from '../../../themes'; | 1 | import type { Theme } from '../../../themes'; |
2 | 2 | ||
3 | export default (theme: Theme) => ({ | 3 | export default (theme: Theme) => ({ |
4 | message: { | 4 | message: { |
diff --git a/src/components/ui/headline/index.tsx b/src/components/ui/headline/index.tsx index 8e40fa896..2070745bb 100644 --- a/src/components/ui/headline/index.tsx +++ b/src/components/ui/headline/index.tsx | |||
@@ -1,15 +1,15 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { | 2 | import { |
3 | Component, | 3 | Component, |
4 | type MouseEventHandler, | ||
5 | type ReactElement, | ||
6 | type ReactNode, | ||
4 | createElement, | 7 | createElement, |
5 | MouseEventHandler, | ||
6 | ReactElement, | ||
7 | ReactNode, | ||
8 | } from 'react'; | 8 | } from 'react'; |
9 | import injectStyle, { WithStylesProps } from 'react-jss'; | 9 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
10 | 10 | ||
11 | import { Theme } from '../../../themes'; | 11 | import type { Theme } from '../../../themes'; |
12 | import { Omit } from '../typings/generic'; | 12 | import type { Omit } from '../typings/generic'; |
13 | 13 | ||
14 | const styles = (theme: Theme) => ({ | 14 | const styles = (theme: Theme) => ({ |
15 | headline: { | 15 | headline: { |
diff --git a/src/components/ui/icon/index.tsx b/src/components/ui/icon/index.tsx index 04a00d0e0..ad9f43730 100644 --- a/src/components/ui/icon/index.tsx +++ b/src/components/ui/icon/index.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import MdiIcon from '@mdi/react'; | 1 | import MdiIcon from '@mdi/react'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { Component, ReactElement } from 'react'; | 3 | import { Component, type ReactElement } from 'react'; |
4 | import injectStyle, { WithStylesProps } from 'react-jss'; | 4 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
5 | 5 | ||
6 | import { Theme } from '../../../themes'; | 6 | import type { Theme } from '../../../themes'; |
7 | 7 | ||
8 | const styles = (theme: Theme) => ({ | 8 | const styles = (theme: Theme) => ({ |
9 | icon: { | 9 | icon: { |
diff --git a/src/components/ui/imageUpload/index.tsx b/src/components/ui/imageUpload/index.tsx index 3b164ed41..876572484 100644 --- a/src/components/ui/imageUpload/index.tsx +++ b/src/components/ui/imageUpload/index.tsx | |||
@@ -1,11 +1,11 @@ | |||
1 | import { Component, ReactElement } from 'react'; | ||
2 | import { observer } from 'mobx-react'; | ||
3 | import classnames from 'classnames'; | ||
4 | import Dropzone from 'react-dropzone'; | ||
5 | import { mdiDelete, mdiFileImage } from '@mdi/js'; | 1 | import { mdiDelete, mdiFileImage } from '@mdi/js'; |
2 | import classnames from 'classnames'; | ||
3 | import { observer } from 'mobx-react'; | ||
6 | import prettyBytes from 'pretty-bytes'; | 4 | import prettyBytes from 'pretty-bytes'; |
7 | import Icon from '../icon'; | 5 | import { Component, type ReactElement } from 'react'; |
6 | import Dropzone from 'react-dropzone'; | ||
8 | import { isWindows } from '../../../environment'; | 7 | import { isWindows } from '../../../environment'; |
8 | import Icon from '../icon'; | ||
9 | 9 | ||
10 | interface IProps { | 10 | interface IProps { |
11 | field: any; | 11 | field: any; |
diff --git a/src/components/ui/infobox/index.tsx b/src/components/ui/infobox/index.tsx index a1c4f9d21..36ea6a59f 100644 --- a/src/components/ui/infobox/index.tsx +++ b/src/components/ui/infobox/index.tsx | |||
@@ -2,9 +2,9 @@ | |||
2 | import { mdiClose } from '@mdi/js'; | 2 | import { mdiClose } from '@mdi/js'; |
3 | import classnames from 'classnames'; | 3 | import classnames from 'classnames'; |
4 | import { noop } from 'lodash'; | 4 | import { noop } from 'lodash'; |
5 | import { Component, ReactElement, ReactNode } from 'react'; | 5 | import { Component, type ReactElement, type ReactNode } from 'react'; |
6 | import withStyles, { WithStylesProps } from 'react-jss'; | 6 | import withStyles, { type WithStylesProps } from 'react-jss'; |
7 | import { Theme } from '../../../themes'; | 7 | import type { Theme } from '../../../themes'; |
8 | import Icon from '../icon'; | 8 | import Icon from '../icon'; |
9 | 9 | ||
10 | const buttonStyles = (theme: Theme) => { | 10 | const buttonStyles = (theme: Theme) => { |
diff --git a/src/components/ui/input/index.tsx b/src/components/ui/input/index.tsx index 68cc9ee22..c61efe570 100644 --- a/src/components/ui/input/index.tsx +++ b/src/components/ui/input/index.tsx | |||
@@ -1,22 +1,26 @@ | |||
1 | import { mdiEye, mdiEyeOff } from '@mdi/js'; | 1 | import { mdiEye, mdiEyeOff } from '@mdi/js'; |
2 | import classnames from 'classnames'; | 2 | import classnames from 'classnames'; |
3 | import { noop } from 'lodash'; | ||
4 | import { observer } from 'mobx-react'; | ||
3 | import { | 5 | import { |
4 | Component, | 6 | Component, |
7 | type InputHTMLAttributes, | ||
8 | type KeyboardEvent, | ||
9 | type ReactElement, | ||
10 | type RefObject, | ||
5 | createRef, | 11 | createRef, |
6 | InputHTMLAttributes, | ||
7 | ReactElement, | ||
8 | RefObject, | ||
9 | KeyboardEvent, | ||
10 | } from 'react'; | 12 | } from 'react'; |
11 | import withStyles, { WithStylesProps } from 'react-jss'; | 13 | import { |
12 | import { noop } from 'lodash'; | 14 | type WrappedComponentProps, |
13 | import { observer } from 'mobx-react'; | 15 | defineMessages, |
14 | import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; | 16 | injectIntl, |
15 | import Icon from '../icon'; | 17 | } from 'react-intl'; |
16 | import { IFormField } from '../typings/generic'; | 18 | import withStyles, { type WithStylesProps } from 'react-jss'; |
17 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 19 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
18 | import Error from '../error'; | 20 | import Error from '../error'; |
21 | import Icon from '../icon'; | ||
19 | import Label from '../label'; | 22 | import Label from '../label'; |
23 | import type { IFormField } from '../typings/generic'; | ||
20 | import Wrapper from '../wrapper'; | 24 | import Wrapper from '../wrapper'; |
21 | import { scorePasswordFunc } from './scorePassword'; | 25 | import { scorePasswordFunc } from './scorePassword'; |
22 | import styles from './styles'; | 26 | import styles from './styles'; |
diff --git a/src/components/ui/input/styles.ts b/src/components/ui/input/styles.ts index ebae0e40d..580c72889 100644 --- a/src/components/ui/input/styles.ts +++ b/src/components/ui/input/styles.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Property } from 'csstype'; | 1 | import type { Property } from 'csstype'; |
2 | 2 | ||
3 | import { Theme } from '../../../themes'; | 3 | import type { Theme } from '../../../themes'; |
4 | 4 | ||
5 | const prefixStyles = (theme: Theme) => ({ | 5 | const prefixStyles = (theme: Theme) => ({ |
6 | background: theme.inputPrefixBackground, | 6 | background: theme.inputPrefixBackground, |
diff --git a/src/components/ui/label/index.tsx b/src/components/ui/label/index.tsx index 5f5cc5c8e..c0a3903b0 100644 --- a/src/components/ui/label/index.tsx +++ b/src/components/ui/label/index.tsx | |||
@@ -1,8 +1,8 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, LabelHTMLAttributes } from 'react'; | 2 | import { Component, type LabelHTMLAttributes } from 'react'; |
3 | import injectSheet, { WithStylesProps } from 'react-jss'; | 3 | import injectSheet, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import { IFormField } from '../typings/generic'; | 5 | import type { IFormField } from '../typings/generic'; |
6 | 6 | ||
7 | import styles from './styles'; | 7 | import styles from './styles'; |
8 | 8 | ||
diff --git a/src/components/ui/label/styles.ts b/src/components/ui/label/styles.ts index faa44ae5b..fecfa1816 100644 --- a/src/components/ui/label/styles.ts +++ b/src/components/ui/label/styles.ts | |||
@@ -1,4 +1,4 @@ | |||
1 | import { Theme } from '../../../themes'; | 1 | import type { Theme } from '../../../themes'; |
2 | 2 | ||
3 | export default (theme: Theme) => ({ | 3 | export default (theme: Theme) => ({ |
4 | content: {}, | 4 | content: {}, |
diff --git a/src/components/ui/loader/index.tsx b/src/components/ui/loader/index.tsx index c0ae15028..8757985b9 100644 --- a/src/components/ui/loader/index.tsx +++ b/src/components/ui/loader/index.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { inject } from 'mobx-react'; | ||
2 | import { Component } from 'react'; | 3 | import { Component } from 'react'; |
3 | import injectStyle, { WithStylesProps } from 'react-jss'; | 4 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
4 | import { Oval } from 'react-loader-spinner'; | 5 | import { Oval } from 'react-loader-spinner'; |
5 | import { inject } from 'mobx-react'; | 6 | import type { FerdiumStores } from '../../../@types/stores.types'; |
6 | import { FerdiumStores } from '../../../@types/stores.types'; | ||
7 | import { DEFAULT_LOADER_COLOR } from '../../../config'; | 7 | import { DEFAULT_LOADER_COLOR } from '../../../config'; |
8 | 8 | ||
9 | const styles = () => ({ | 9 | const styles = () => ({ |
diff --git a/src/components/ui/select/index.tsx b/src/components/ui/select/index.tsx index 0d8520f58..2716ebc2d 100644 --- a/src/components/ui/select/index.tsx +++ b/src/components/ui/select/index.tsx | |||
@@ -5,14 +5,19 @@ import { | |||
5 | } from '@mdi/js'; | 5 | } from '@mdi/js'; |
6 | import Icon from '@mdi/react'; | 6 | import Icon from '@mdi/react'; |
7 | import classnames from 'classnames'; | 7 | import classnames from 'classnames'; |
8 | import { ChangeEvent, Component, createRef, ReactElement } from 'react'; | ||
9 | import withStyles, { WithStylesProps } from 'react-jss'; | ||
10 | import { noop } from 'lodash'; | 8 | import { noop } from 'lodash'; |
11 | import { Theme } from '../../../themes'; | 9 | import { |
12 | import { IFormField } from '../typings/generic'; | 10 | type ChangeEvent, |
11 | Component, | ||
12 | type ReactElement, | ||
13 | createRef, | ||
14 | } from 'react'; | ||
15 | import withStyles, { type WithStylesProps } from 'react-jss'; | ||
16 | import type { Theme } from '../../../themes'; | ||
13 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 17 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
14 | import Error from '../error'; | 18 | import Error from '../error'; |
15 | import Label from '../label'; | 19 | import Label from '../label'; |
20 | import type { IFormField } from '../typings/generic'; | ||
16 | import Wrapper from '../wrapper'; | 21 | import Wrapper from '../wrapper'; |
17 | 22 | ||
18 | let popupTransition: string = 'none'; | 23 | let popupTransition: string = 'none'; |
diff --git a/src/components/ui/textarea/index.tsx b/src/components/ui/textarea/index.tsx index 0967c4c25..4a0e77afe 100644 --- a/src/components/ui/textarea/index.tsx +++ b/src/components/ui/textarea/index.tsx | |||
@@ -1,9 +1,9 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, createRef, TextareaHTMLAttributes } from 'react'; | 2 | import { Component, type TextareaHTMLAttributes, createRef } from 'react'; |
3 | import injectSheet, { WithStylesProps } from 'react-jss'; | 3 | import injectSheet, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | import { noop } from 'lodash'; | 5 | import { noop } from 'lodash'; |
6 | import { IFormField } from '../typings/generic'; | 6 | import type { IFormField } from '../typings/generic'; |
7 | 7 | ||
8 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 8 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
9 | import Error from '../error'; | 9 | import Error from '../error'; |
diff --git a/src/components/ui/textarea/styles.ts b/src/components/ui/textarea/styles.ts index 36fc2a82e..c4c27b95d 100644 --- a/src/components/ui/textarea/styles.ts +++ b/src/components/ui/textarea/styles.ts | |||
@@ -1,6 +1,6 @@ | |||
1 | import { Property } from 'csstype'; | 1 | import type { Property } from 'csstype'; |
2 | 2 | ||
3 | import { Theme } from '../../../themes'; | 3 | import type { Theme } from '../../../themes'; |
4 | 4 | ||
5 | export default (theme: Theme) => ({ | 5 | export default (theme: Theme) => ({ |
6 | label: { | 6 | label: { |
diff --git a/src/components/ui/toggle/index.tsx b/src/components/ui/toggle/index.tsx index 878ffecdc..dc426b3a1 100644 --- a/src/components/ui/toggle/index.tsx +++ b/src/components/ui/toggle/index.tsx | |||
@@ -1,13 +1,13 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Property } from 'csstype'; | 2 | import type { Property } from 'csstype'; |
3 | import { noop } from 'lodash'; | 3 | import { noop } from 'lodash'; |
4 | import { Component, InputHTMLAttributes, ReactElement } from 'react'; | 4 | import { Component, type InputHTMLAttributes, type ReactElement } from 'react'; |
5 | import withStyles, { WithStylesProps } from 'react-jss'; | 5 | import withStyles, { type WithStylesProps } from 'react-jss'; |
6 | import { Theme } from '../../../themes'; | 6 | import type { Theme } from '../../../themes'; |
7 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> | 7 | // biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation> |
8 | import Error from '../error'; | 8 | import Error from '../error'; |
9 | import Label from '../label'; | 9 | import Label from '../label'; |
10 | import { IFormField } from '../typings/generic'; | 10 | import type { IFormField } from '../typings/generic'; |
11 | import Wrapper from '../wrapper'; | 11 | import Wrapper from '../wrapper'; |
12 | 12 | ||
13 | const buttonTransition: string = window?.matchMedia( | 13 | const buttonTransition: string = window?.matchMedia( |
diff --git a/src/components/ui/wrapper/index.tsx b/src/components/ui/wrapper/index.tsx index 450d09fd1..081b13b36 100644 --- a/src/components/ui/wrapper/index.tsx +++ b/src/components/ui/wrapper/index.tsx | |||
@@ -1,6 +1,6 @@ | |||
1 | import classnames from 'classnames'; | 1 | import classnames from 'classnames'; |
2 | import { Component, ReactNode } from 'react'; | 2 | import { Component, type ReactNode } from 'react'; |
3 | import injectStyle, { WithStylesProps } from 'react-jss'; | 3 | import injectStyle, { type WithStylesProps } from 'react-jss'; |
4 | 4 | ||
5 | // eslint-disable-next-line no-use-before-define | 5 | // eslint-disable-next-line no-use-before-define |
6 | interface IProps extends WithStylesProps<typeof styles> { | 6 | interface IProps extends WithStylesProps<typeof styles> { |