ish-ui 1.0.41 → 1.0.43

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.
@@ -45,14 +45,11 @@ function EditInPlaceField({ inputRef, input, label, maxLength, disabled, min, ma
45
45
  }) },
46
46
  React.createElement(EditInPlaceFieldBase, { name: input.name, value: inputValue, variant: variant, error: error, invalid: invalid, inline: inline, label: label, warning: warning, fieldClasses: fieldClasses, endAdornmentClass: classes.endAdornment, rightAligned: rightAligned, shrink: Boolean(label || input.value), disabled: disabled, labelAdornment: labelAdornment, placeholder: placeholder, hideArrows: ['percentage', 'number'].includes(type), editIcon: editIcon === undefined ? React.createElement(Edit, { fontSize: inline ? 'inherit' : undefined }) : editIcon, InputProps: Object.assign({ multiline,
47
47
  onKeyPress,
48
- onBlur, onFocus: input.onFocus, maxRows: truncateLines, inputProps: {
49
- ref: inputRef,
50
- maxLength,
48
+ onBlur, onFocus: input.onFocus, maxRows: truncateLines, inputProps: Object.assign({ ref: inputRef, maxLength,
51
49
  step,
52
50
  min,
53
51
  max,
54
52
  onKeyDown,
55
- type,
56
- }, value: inputValue, onChange: v => (type === 'number' && max && Number(v) > Number(max) ? null : input.onChange(v)) }, InputProps) })));
53
+ type }, InputProps.inputProps || {}), value: inputValue, onChange: v => (type === 'number' && max && Number(v) > Number(max) ? null : input.onChange(v)) }, InputProps) })));
57
54
  }
58
55
  export default EditInPlaceField;
@@ -11,7 +11,8 @@ import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
11
11
  import EditInPlaceField from './EditInPlaceField';
12
12
  import IconButton from '@mui/material/IconButton';
13
13
  function EditInPlacePasswordField(props) {
14
+ var _a;
14
15
  const [showPassword, setShowPassword] = useState(false);
15
- return (React.createElement(EditInPlaceField, Object.assign({}, props, { type: showPassword ? 'text' : 'password', editIcon: React.createElement(IconButton, { sx: props.variant === 'outlined' ? { marginRight: -1 } : null, onClick: () => setShowPassword(!showPassword) }, showPassword ? React.createElement(VisibilityOffIcon, null) : React.createElement(VisibilityIcon, null)) })));
16
+ return (React.createElement(EditInPlaceField, Object.assign({}, props, { editIcon: React.createElement(IconButton, { sx: props.variant === 'outlined' ? { marginRight: -1 } : null, onClick: () => setShowPassword(!showPassword) }, showPassword ? React.createElement(VisibilityOffIcon, null) : React.createElement(VisibilityIcon, null)), InputProps: Object.assign(Object.assign({}, props.InputProps || {}), { inputProps: Object.assign(Object.assign({}, ((_a = props.InputProps) === null || _a === void 0 ? void 0 : _a.inputProps) || {}), { type: showPassword ? 'text' : 'password' }) }) })));
16
17
  }
17
18
  export default EditInPlacePasswordField;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ish-ui",
3
- "version": "1.0.41",
3
+ "version": "1.0.43",
4
4
  "description": "UI elements for onCourse and other ish apps",
5
5
  "main": "main.ts",
6
6
  "devDependencies": {