aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/ui
diff options
context:
space:
mode:
authorLibravatar MCMXC <16797721+mcmxcdev@users.noreply.github.com>2023-12-22 12:23:52 -0700
committerLibravatar MCMXC <16797721+mcmxcdev@users.noreply.github.com>2023-12-22 12:23:52 -0700
commit2f449ce766ec9f6a8666523087ea90e3ca5858ee (patch)
treee86478b66e5986c412b44c7ce653c8876205f46a /src/components/ui
parentMerge branch 'develop' into release (Bump to 6.6.0) (diff)
parent6.6.1-nightly.23 [skip ci] (diff)
downloadferdium-app-2f449ce766ec9f6a8666523087ea90e3ca5858ee.tar.gz
ferdium-app-2f449ce766ec9f6a8666523087ea90e3ca5858ee.tar.zst
ferdium-app-2f449ce766ec9f6a8666523087ea90e3ca5858ee.zip
New public release: 6.7.0v6.7.0
Diffstat (limited to 'src/components/ui')
-rw-r--r--src/components/ui/AppLoader/index.tsx2
-rw-r--r--src/components/ui/Link.tsx1
-rw-r--r--src/components/ui/Radio.tsx1
-rw-r--r--src/components/ui/SearchInput.tsx1
-rw-r--r--src/components/ui/button/index.tsx1
-rw-r--r--src/components/ui/input/index.tsx1
-rw-r--r--src/components/ui/input/scorePassword.ts2
-rw-r--r--src/components/ui/select/index.tsx22
-rw-r--r--src/components/ui/textarea/index.tsx2
-rw-r--r--src/components/ui/toggle/index.tsx1
10 files changed, 15 insertions, 19 deletions
diff --git a/src/components/ui/AppLoader/index.tsx b/src/components/ui/AppLoader/index.tsx
index 64c840aaa..4b5828ef4 100644
--- a/src/components/ui/AppLoader/index.tsx
+++ b/src/components/ui/AppLoader/index.tsx
@@ -61,7 +61,7 @@ class AppLoader extends Component<IProps, IState> {
61 className={classes.component} 61 className={classes.component}
62 spinnerColor={theme.colorAppLoaderSpinner} 62 spinnerColor={theme.colorAppLoaderSpinner}
63 > 63 >
64 {texts?.map((text, i) => ( 64 {texts.map((text, i) => (
65 <span 65 <span
66 key={text} 66 key={text}
67 className={classnames({ 67 className={classnames({
diff --git a/src/components/ui/Link.tsx b/src/components/ui/Link.tsx
index a9a429d3a..f9fdd57f9 100644
--- a/src/components/ui/Link.tsx
+++ b/src/components/ui/Link.tsx
@@ -54,6 +54,7 @@ class Link extends Component<IProps> {
54 }); 54 });
55 55
56 return ( 56 return (
57 // biome-ignore lint/a11y/useValidAnchor: <explanation>
57 <a 58 <a
58 href={router.history.createHref(to)} 59 href={router.history.createHref(to)}
59 className={linkClasses} 60 className={linkClasses}
diff --git a/src/components/ui/Radio.tsx b/src/components/ui/Radio.tsx
index 1f41deedc..901958c78 100644
--- a/src/components/ui/Radio.tsx
+++ b/src/components/ui/Radio.tsx
@@ -2,6 +2,7 @@ import { Component } from 'react';
2import { observer } from 'mobx-react'; 2import { observer } from 'mobx-react';
3import classnames from 'classnames'; 3import classnames from 'classnames';
4import FieldInterface from 'mobx-react-form/lib/models/FieldInterface'; 4import FieldInterface from 'mobx-react-form/lib/models/FieldInterface';
5// biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>
5import Error from './error'; 6import Error from './error';
6 7
7type Props = { 8type Props = {
diff --git a/src/components/ui/SearchInput.tsx b/src/components/ui/SearchInput.tsx
index 39b8f95bf..b2caaa1de 100644
--- a/src/components/ui/SearchInput.tsx
+++ b/src/components/ui/SearchInput.tsx
@@ -82,6 +82,7 @@ class SearchInput extends Component<IProps, IState> {
82 82
83 return ( 83 return (
84 <div className={classnames([className, 'search-input'])}> 84 <div className={classnames([className, 'search-input'])}>
85 {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */}
85 <label htmlFor={name}> 86 <label htmlFor={name}>
86 <Icon icon={mdiMagnify} /> 87 <Icon icon={mdiMagnify} />
87 <input 88 <input
diff --git a/src/components/ui/button/index.tsx b/src/components/ui/button/index.tsx
index f8bcf76b2..a2194e34d 100644
--- a/src/components/ui/button/index.tsx
+++ b/src/components/ui/button/index.tsx
@@ -205,6 +205,7 @@ class ButtonComponent extends Component<IProps, IState> {
205 ); 205 );
206 206
207 const wrapperComponent = href ? ( 207 const wrapperComponent = href ? (
208 // biome-ignore lint/a11y/useValidAnchor: <explanation>
208 <a 209 <a
209 href={href} 210 href={href}
210 target={target} 211 target={target}
diff --git a/src/components/ui/input/index.tsx b/src/components/ui/input/index.tsx
index 064c1807f..68cc9ee22 100644
--- a/src/components/ui/input/index.tsx
+++ b/src/components/ui/input/index.tsx
@@ -14,6 +14,7 @@ import { observer } from 'mobx-react';
14import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl'; 14import { defineMessages, injectIntl, WrappedComponentProps } from 'react-intl';
15import Icon from '../icon'; 15import Icon from '../icon';
16import { IFormField } from '../typings/generic'; 16import { IFormField } from '../typings/generic';
17// biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>
17import Error from '../error'; 18import Error from '../error';
18import Label from '../label'; 19import Label from '../label';
19import Wrapper from '../wrapper'; 20import Wrapper from '../wrapper';
diff --git a/src/components/ui/input/scorePassword.ts b/src/components/ui/input/scorePassword.ts
index 59502e2b0..4a9f67265 100644
--- a/src/components/ui/input/scorePassword.ts
+++ b/src/components/ui/input/scorePassword.ts
@@ -33,7 +33,7 @@ export function scorePasswordFunc(password: string): number {
33 33
34 let variationCount = 0; 34 let variationCount = 0;
35 for (const key of Object.keys(variations)) { 35 for (const key of Object.keys(variations)) {
36 variationCount += variations[key] === true ? 1 : 0; 36 variationCount += variations[key] ? 1 : 0;
37 } 37 }
38 38
39 score += (variationCount - 1) * 10; 39 score += (variationCount - 1) * 10;
diff --git a/src/components/ui/select/index.tsx b/src/components/ui/select/index.tsx
index 650600fb3..0d8520f58 100644
--- a/src/components/ui/select/index.tsx
+++ b/src/components/ui/select/index.tsx
@@ -10,6 +10,7 @@ import withStyles, { WithStylesProps } from 'react-jss';
10import { noop } from 'lodash'; 10import { noop } from 'lodash';
11import { Theme } from '../../../themes'; 11import { Theme } from '../../../themes';
12import { IFormField } from '../typings/generic'; 12import { IFormField } from '../typings/generic';
13// biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>
13import Error from '../error'; 14import Error from '../error';
14import Label from '../label'; 15import Label from '../label';
15import Wrapper from '../wrapper'; 16import Wrapper from '../wrapper';
@@ -281,23 +282,23 @@ class SelectComponent extends Component<IProps, IState> {
281 282
282 if (!open) return; 283 if (!open) return;
283 284
284 if (e.keyCode === 38 || e.keyCode === 40) { 285 if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
285 e.preventDefault(); 286 e.preventDefault();
286 } 287 }
287 288
288 if (this.componentRef?.current) { 289 if (this.componentRef?.current) {
289 if (e.keyCode === 38 && selected > 0) { 290 if (e.key === 'ArrowUp' && selected > 0) {
290 this.setState((state: IState) => ({ 291 this.setState((state: IState) => ({
291 selected: state.selected - 1, 292 selected: state.selected - 1,
292 })); 293 }));
293 } else if ( 294 } else if (
294 e.keyCode === 40 && 295 e.key === 'ArrowDown' &&
295 selected < Object.keys(options!).length - 1 296 selected < Object.keys(options!).length - 1
296 ) { 297 ) {
297 this.setState((state: IState) => ({ 298 this.setState((state: IState) => ({
298 selected: state.selected + 1, 299 selected: state.selected + 1,
299 })); 300 }));
300 } else if (e.keyCode === 13) { 301 } else if (e.key === 'Enter') {
301 this.select(Object.keys(options!)[selected]); 302 this.select(Object.keys(options!)[selected]);
302 } 303 }
303 304
@@ -310,19 +311,6 @@ class SelectComponent extends Component<IProps, IState> {
310 this.scrollContainerRef.current.scrollTop = topOffset - 35; 311 this.scrollContainerRef.current.scrollTop = topOffset - 35;
311 } 312 }
312 } 313 }
313
314 switch (e.keyCode) {
315 case 37:
316 case 39:
317 case 38:
318 case 40: // Arrow keys
319 case 32: {
320 break;
321 } // Space
322 default: {
323 break;
324 } // do not block other keys
325 }
326 } 314 }
327 315
328 render(): ReactElement { 316 render(): ReactElement {
diff --git a/src/components/ui/textarea/index.tsx b/src/components/ui/textarea/index.tsx
index fbdef7fc6..0967c4c25 100644
--- a/src/components/ui/textarea/index.tsx
+++ b/src/components/ui/textarea/index.tsx
@@ -5,6 +5,7 @@ import injectSheet, { WithStylesProps } from 'react-jss';
5import { noop } from 'lodash'; 5import { noop } from 'lodash';
6import { IFormField } from '../typings/generic'; 6import { IFormField } from '../typings/generic';
7 7
8// biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>
8import Error from '../error'; 9import Error from '../error';
9import Label from '../label'; 10import Label from '../label';
10import Wrapper from '../wrapper'; 11import Wrapper from '../wrapper';
@@ -40,6 +41,7 @@ class TextareaComponent extends Component<IProps> {
40 41
41 if (this.textareaRef?.current && data) { 42 if (this.textareaRef?.current && data) {
42 Object.keys(data).map( 43 Object.keys(data).map(
44 // biome-ignore lint/suspicious/noAssignInExpressions: <explanation>
43 key => (this.textareaRef.current!.dataset[key] = data[key]), 45 key => (this.textareaRef.current!.dataset[key] = data[key]),
44 ); 46 );
45 } 47 }
diff --git a/src/components/ui/toggle/index.tsx b/src/components/ui/toggle/index.tsx
index 275d28bf6..878ffecdc 100644
--- a/src/components/ui/toggle/index.tsx
+++ b/src/components/ui/toggle/index.tsx
@@ -4,6 +4,7 @@ import { noop } from 'lodash';
4import { Component, InputHTMLAttributes, ReactElement } from 'react'; 4import { Component, InputHTMLAttributes, ReactElement } from 'react';
5import withStyles, { WithStylesProps } from 'react-jss'; 5import withStyles, { WithStylesProps } from 'react-jss';
6import { Theme } from '../../../themes'; 6import { Theme } from '../../../themes';
7// biome-ignore lint/suspicious/noShadowRestrictedNames: <explanation>
7import Error from '../error'; 8import Error from '../error';
8import Label from '../label'; 9import Label from '../label';
9import { IFormField } from '../typings/generic'; 10import { IFormField } from '../typings/generic';