@etsoo/materialui 1.0.95 → 1.0.96

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 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 = '200px', icon, onClose, selectedValue, size = 'medium', title, variant = 'outlined' } = props;
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, sx: { minWidth } },
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, null,
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.95",
3
+ "version": "1.0.96",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
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 = '200px',
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];