ish-ui 1.0.32 → 1.0.34

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.
@@ -1,9 +1,7 @@
1
1
  import React from 'react';
2
2
  import { EditInPlaceFieldProps } from '../model';
3
- import { Dispatch } from 'redux';
4
3
  interface Props<InputProps, MetaProps> extends EditInPlaceFieldProps<InputProps, MetaProps> {
5
4
  currencySymbol: string;
6
- dispatch?: Dispatch;
7
5
  }
8
6
  declare function EditInPlaceMoneyField<IP, MP>({ InputProps, currencySymbol, className, ...restProps }: Props<IP, MP>): React.JSX.Element;
9
7
  export default EditInPlaceMoneyField;
@@ -33,6 +33,7 @@ const preformatDisplayValue = value => value || value === 0 ? formatCurrency(val
33
33
  function EditInPlaceMoneyField(_a) {
34
34
  var _b;
35
35
  var { InputProps, currencySymbol, className } = _a, restProps = __rest(_a, ["InputProps", "currencySymbol", "className"]);
36
- return (React.createElement(EditInPlaceField, Object.assign({}, restProps, { preformatDisplayValue: preformatDisplayValue, InputProps: Object.assign(Object.assign({}, InputProps), { startAdornment: React.createElement(InputAdornment, { position: "start", className: (_b = restProps.fieldClasses) === null || _b === void 0 ? void 0 : _b.text }, currencySymbol), inputComponent: NumberFormatCustom }), className: clsx('money', className) })));
36
+ return (React.createElement(EditInPlaceField, Object.assign({}, restProps, { preformatDisplayValue: preformatDisplayValue, InputProps: Object.assign(Object.assign({}, InputProps), { startAdornment: React.createElement(InputAdornment, { position: "start", className: (_b = restProps.fieldClasses) === null || _b === void 0 ? void 0 : _b.text },
37
+ React.createElement("span", null, currencySymbol)), inputComponent: NumberFormatCustom }), className: clsx('money', className) })));
37
38
  }
38
39
  export default EditInPlaceMoneyField;
@@ -311,7 +311,9 @@ function EditInPlaceSearchSelect({ label, disabled, className, labelAdornment, i
311
311
  ?
312
312
  React.createElement(Select, Object.assign({}, InputProps, { inputRef: ref => {
313
313
  inputProps.ref.current = ref === null || ref === void 0 ? void 0 : ref.node;
314
- }, classes: { select: 'cursor-text' }, onFocus: edit, value: (returnType === 'object' ? input.value[selectValueMark] : input.value) || '', endAdornment: React.createElement(InputAdornment, { position: "end", className: 'd-none' }, renderIcons), IconComponent: stubComponent }), renderValue)
314
+ }, classes: {
315
+ select: clsx('cursor-text', fieldClasses.text)
316
+ }, onFocus: edit, value: (returnType === 'object' ? input.value[selectValueMark] : input.value) || '', endAdornment: React.createElement(InputAdornment, { position: "end", className: 'd-none' }, renderIcons), IconComponent: stubComponent }), renderValue)
315
317
  : null })));
316
318
  }, disableListWrap: true, openOnFocus: true, fullWidth: true }))));
317
319
  }
@@ -52,7 +52,6 @@ export interface FieldMetaProps {
52
52
  touched: boolean;
53
53
  }
54
54
  export interface FieldClasses {
55
- input?: string;
56
55
  text?: string;
57
56
  underline?: string;
58
57
  label?: string;
@@ -140,8 +140,7 @@ const globalStyles = (theme) => createStyles({
140
140
  }, '.checkboxWidth': {
141
141
  width: '35px'
142
142
  }, '.placeholderContent': {
143
- color: theme.palette.divider,
144
- fill: theme.palette.divider,
143
+ opacity: 0.15,
145
144
  fontWeight: 400,
146
145
  }, '.link': {
147
146
  color: 'inherit',
@@ -251,13 +251,18 @@ function TagInputList({ input, tags, placeholder, labelAdornment, meta, label =
251
251
  }, renderInput: (_a) => {
252
252
  var { InputProps, inputProps } = _a, params = __rest(_a, ["InputProps", "inputProps"]);
253
253
  return (React.createElement(EditInPlaceFieldBase, Object.assign({}, params, { variant: variant, name: input.name, value: input.value, error: meta.error, invalid: meta === null || meta === void 0 ? void 0 : meta.invalid, label: label, warning: warning, disabled: disabled, fieldClasses: fieldClasses, shrink: Boolean(label || input.value), labelAdornment: labelAdornment, placeholder: placeholder, editIcon: editIcon === undefined ? React.createElement(Edit, null) : editIcon, InputProps: Object.assign(Object.assign({}, InputProps), { onChange: handleInputChange, onFocus,
254
- onBlur, inputProps: Object.assign(Object.assign({}, inputProps), { ref: ref => {
254
+ onBlur, classes: {
255
+ underline: fieldClasses.underline,
256
+ input: clsx(disabled && classes.readonly, fieldClasses.text),
257
+ }, inputProps: Object.assign(Object.assign({}, inputProps), { ref: ref => {
255
258
  inputProps.ref.current = ref;
256
259
  inputNode.current = ref;
257
- }, value: inputValue }) }), CustomInput: !isEditing
260
+ }, value: inputValue, className: clsx(inputProps.className, fieldClasses.text) }) }), CustomInput: !isEditing
258
261
  ? React.createElement(Select, { inputRef: ref => {
259
262
  inputProps.ref.current = ref === null || ref === void 0 ? void 0 : ref.node;
260
- }, onFocus: edit, value: "stub", className: classes.inputWrapper, classes: { select: 'd-flex flex-wrap cursor-text' }, endAdornment: React.createElement(InputAdornment, { position: "end", className: clsx(classes.editIcon, 'invisible') },
263
+ }, onFocus: edit, value: "stub", className: classes.inputWrapper, classes: {
264
+ select: clsx('d-flex flex-wrap cursor-text', fieldClasses.text)
265
+ }, endAdornment: React.createElement(InputAdornment, { position: "end", className: clsx(classes.editIcon, 'invisible') },
261
266
  React.createElement(Edit, { className: "test" })), IconComponent: stubComponent },
262
267
  React.createElement(MenuItem, { value: "stub" }, InputValueForRender || React.createElement("span", { className: "placeholderContent" }, placeholder)))
263
268
  : null })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ish-ui",
3
- "version": "1.0.32",
3
+ "version": "1.0.34",
4
4
  "description": "UI elements for onCourse and other ish apps",
5
5
  "main": "main.ts",
6
6
  "devDependencies": {