@etsoo/materialui 1.0.95 → 1.0.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ItemList.js +3 -3
- package/package.json +7 -7
- package/src/ItemList.tsx +2 -3
package/lib/ItemList.js
CHANGED
|
@@ -8,7 +8,7 @@ import { DataTypes } from '@etsoo/shared';
|
|
|
8
8
|
export function ItemList(props) {
|
|
9
9
|
var _a;
|
|
10
10
|
// properties destructure
|
|
11
|
-
const { buttonLabel, className, color = 'primary', keepClick = false, items, idField = 'id', labelField = 'label', minWidth
|
|
11
|
+
const { buttonLabel, className, color = 'primary', keepClick = false, items, idField = 'id', labelField = 'label', minWidth, icon, onClose, selectedValue, size = 'medium', title, variant = 'outlined' } = props;
|
|
12
12
|
// Get label
|
|
13
13
|
const getLabel = (item) => {
|
|
14
14
|
var _a;
|
|
@@ -58,9 +58,9 @@ export function ItemList(props) {
|
|
|
58
58
|
};
|
|
59
59
|
return (React.createElement(React.Fragment, null,
|
|
60
60
|
React.createElement(Button, { className: className, variant: variant, startIcon: icon, color: color, size: size, onClick: clickHandler }, buttonLabel !== null && buttonLabel !== void 0 ? buttonLabel : getLabel(currentItem)),
|
|
61
|
-
React.createElement(Dialog, { "aria-labelledby": "dialog-title", open: open, onClose: closeHandler
|
|
61
|
+
React.createElement(Dialog, { "aria-labelledby": "dialog-title", open: open, onClose: closeHandler },
|
|
62
62
|
title && React.createElement(DialogTitle, { id: "dialog-title" }, title),
|
|
63
|
-
React.createElement(DialogContent,
|
|
63
|
+
React.createElement(DialogContent, { sx: { minWidth } },
|
|
64
64
|
React.createElement(List, null, items.map((item) => {
|
|
65
65
|
const id = item[idField];
|
|
66
66
|
return (React.createElement(ListItemButton, { key: id, disabled: id === currentItem[idField] &&
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.97",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -51,15 +51,15 @@
|
|
|
51
51
|
"@emotion/css": "^11.10.5",
|
|
52
52
|
"@emotion/react": "^11.10.5",
|
|
53
53
|
"@emotion/styled": "^11.10.5",
|
|
54
|
-
"@etsoo/appscript": "^1.3.
|
|
54
|
+
"@etsoo/appscript": "^1.3.44",
|
|
55
55
|
"@etsoo/notificationbase": "^1.1.18",
|
|
56
|
-
"@etsoo/react": "^1.6.
|
|
57
|
-
"@etsoo/shared": "^1.1.
|
|
56
|
+
"@etsoo/react": "^1.6.35",
|
|
57
|
+
"@etsoo/shared": "^1.1.79",
|
|
58
58
|
"@mui/icons-material": "^5.10.16",
|
|
59
59
|
"@mui/material": "^5.10.16",
|
|
60
60
|
"@types/pica": "^9.0.1",
|
|
61
61
|
"@types/pulltorefreshjs": "^0.1.5",
|
|
62
|
-
"@types/react": "^18.0.
|
|
62
|
+
"@types/react": "^18.0.26",
|
|
63
63
|
"@types/react-avatar-editor": "^13.0.0",
|
|
64
64
|
"@types/react-dom": "^18.0.9",
|
|
65
65
|
"@types/react-input-mask": "^3.0.2",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"react-dom": "^18.2.0",
|
|
72
72
|
"react-draggable": "^4.4.5",
|
|
73
73
|
"react-imask": "^6.4.3",
|
|
74
|
-
"react-router-dom": "^6.4.
|
|
74
|
+
"react-router-dom": "^6.4.4",
|
|
75
75
|
"react-window": "^1.8.8"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"@types/jest": "^29.2.3",
|
|
86
86
|
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
87
87
|
"@typescript-eslint/parser": "^5.45.0",
|
|
88
|
-
"eslint": "^8.
|
|
88
|
+
"eslint": "^8.29.0",
|
|
89
89
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
90
90
|
"eslint-plugin-import": "^2.26.0",
|
|
91
91
|
"eslint-plugin-react": "^7.31.11",
|
package/src/ItemList.tsx
CHANGED
|
@@ -112,7 +112,7 @@ export function ItemList<
|
|
|
112
112
|
items,
|
|
113
113
|
idField = 'id' as D,
|
|
114
114
|
labelField = 'label' as L,
|
|
115
|
-
minWidth
|
|
115
|
+
minWidth,
|
|
116
116
|
icon,
|
|
117
117
|
onClose,
|
|
118
118
|
selectedValue,
|
|
@@ -194,10 +194,9 @@ export function ItemList<
|
|
|
194
194
|
aria-labelledby="dialog-title"
|
|
195
195
|
open={open}
|
|
196
196
|
onClose={closeHandler}
|
|
197
|
-
sx={{ minWidth }}
|
|
198
197
|
>
|
|
199
198
|
{title && <DialogTitle id="dialog-title">{title}</DialogTitle>}
|
|
200
|
-
<DialogContent>
|
|
199
|
+
<DialogContent sx={{ minWidth }}>
|
|
201
200
|
<List>
|
|
202
201
|
{items.map((item) => {
|
|
203
202
|
const id = item[idField];
|