Skip to content

Commit

Permalink
Merge pull request #829 from L4Ph/upgrade-mui-latest
Browse files Browse the repository at this point in the history
Upgrade MUI
  • Loading branch information
yoichiro authored Jun 1, 2024
2 parents 625a929 + b540b76 commit c618272
Show file tree
Hide file tree
Showing 6 changed files with 393 additions and 365 deletions.
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,11 @@
"version": "0.2.3",
"private": true,
"dependencies": {
"@emotion/react": "^11.7.1",
"@emotion/styled": "^11.6.0",
"@mui/icons-material": "^5.2.5",
"@mui/lab": "^5.0.0-alpha.64",
"@mui/material": "^5.2.8",
"@mui/styles": "^5.2.3",
"@emotion/react": "^11.11.4",
"@emotion/styled": "^11.11.5",
"@mui/icons-material": "^5.15.19",
"@mui/material": "^5.15.19",
"@mui/styles": "^5.15.19",
"@pdf-lib/fontkit": "^1.1.1",
"@types/react-helmet-async": "^1.0.3",
"@types/react-image-gallery": "^1.0.4",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
CircularProgress,
Typography,
} from '@mui/material';
import { Alert, AlertTitle } from '@mui/lab';
import { Alert, AlertTitle } from '@mui/material';
import ExpandMoreIcon from '@mui/icons-material/ExpandMore';
import './KeyboardDefinitionFormPart.scss';
import { IKeyboardDefinitionDocument } from '../../../services/storage/Storage';
Expand Down
8 changes: 4 additions & 4 deletions src/components/common/layer/LayerPagination.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Badge, Chip, IconButton } from '@mui/material';
import { makeStyles, withStyles } from '@mui/styles';
import { usePagination } from '@mui/lab';
import usePagination from '@mui/material/usePagination';
import {
KeyboardArrowDown,
KeyboardArrowLeft,
Expand Down Expand Up @@ -43,7 +43,7 @@ type LayerPaginationOrientation = 'horizontal' | 'vertical';
type LayerPaginationProps = {
count: number;
invisiblePages: boolean[];
page: number;
page: number | null;
// eslint-disable-next-line no-unused-vars
onClickPage: (page: number) => void;
orientation: LayerPaginationOrientation;
Expand All @@ -61,7 +61,7 @@ export default function LayerPagination(props: LayerPaginationProps) {
const classes = useLayerPaginationStyles();
const { items } = usePagination({
count: props.count,
page: props.page,
page: props.page !== null ? props.page : 1,
onChange: (event, page) => {
props.onClickPage(page);
},
Expand All @@ -77,7 +77,7 @@ export default function LayerPagination(props: LayerPaginationProps) {
>
{items.map(({ page, type, selected, ...item }, index) => {
let children = null;
if (type === 'page') {
if (type === 'page' && page !== null) {
children = (
<StyledBadge
color="primary"
Expand Down
5 changes: 4 additions & 1 deletion src/components/configure/customkey/AutocompleteKeys.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import './AutocompleteKeys.scss';
import Autocomplete from '@mui/lab/Autocomplete';
import Autocomplete from '@mui/material/Autocomplete';
import { TextField } from '@mui/material';
import { IKeymap } from '../../../services/hid/Hid';
import { KeymapCategory } from '../../../services/hid/KeycodeList';
Expand Down Expand Up @@ -89,6 +89,9 @@ export default class AutocompleteKeys extends React.Component<
this.setInputValue(newInputValue.split('::')[0]);
}}
getOptionLabel={(option) => {
if (typeof option === 'string') {
return option;
}
return `${option.keycodeInfo!.label}::${option.kinds.join('::')}`;
}}
renderOption={(props, option) => (
Expand Down
2 changes: 1 addition & 1 deletion src/components/configure/importDef/ImportDefDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
import { Button, Dialog, DialogContent, DialogTitle } from '@mui/material';
import CloseIcon from '@mui/icons-material/Close';
import Paper, { PaperProps } from '@mui/material/Paper';
import { Alert, AlertTitle } from '@mui/lab';
import { Alert, AlertTitle } from '@mui/material';

import { KeyboardDefinitionSchema } from '../../../gen/types/KeyboardDefinition';
import { KeyboardDefinitionFormPart } from '../../common/keyboarddefformpart/KeyboardDefinitionFormPart';
Expand Down
Loading

0 comments on commit c618272

Please sign in to comment.