@devtron-labs/devtron-fe-common-lib 0.0.54-beta-1 → 0.0.54

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,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { CustomInputProps } from './Types';
3
- export declare function CustomInput({ name, value, error, onChange, onFocus, label, type, disabled, labelClassName, placeholder, tabIndex, dataTestid, isRequiredField, autoFocus, rootClassName, autoComplete, helperText, handleOnBlur, readOnly, noTrim, ref, onKeyPress, defaultValue, onKeyDown, required, additionalErrorInfo, inputWrapperClassName }: CustomInputProps): JSX.Element;
3
+ export declare function CustomInput({ name, value, error, onChange, onFocus, label, type, disabled, labelClassName, placeholder, tabIndex, dataTestid, isRequiredField, autoFocus, rootClassName, autoComplete, helperText, handleOnBlur, readOnly, noTrim, ref, onKeyPress, defaultValue, onKeyDown, required, additionalErrorInfo }: CustomInputProps): JSX.Element;
@@ -26,5 +26,4 @@ export interface CustomInputProps {
26
26
  onKeyDown?: (e: any) => void;
27
27
  required?: boolean;
28
28
  additionalErrorInfo?: React.ReactNode;
29
- inputWrapperClassName?: string;
30
29
  }
package/dist/index.js CHANGED
@@ -28468,7 +28468,7 @@ var handleAddCD = function (_a) {
28468
28468
  };
28469
28469
 
28470
28470
  function CustomInput(_a) {
28471
- var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onFocus, onFocus = _b === void 0 ? function (e) { } : _b, label = _a.label, _c = _a.type, type = _c === void 0 ? 'text' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.labelClassName, labelClassName = _e === void 0 ? '' : _e, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.tabIndex, tabIndex = _g === void 0 ? 1 : _g, _h = _a.dataTestid, dataTestid = _h === void 0 ? '' : _h, _j = _a.isRequiredField, isRequiredField = _j === void 0 ? false : _j, _k = _a.autoFocus, autoFocus = _k === void 0 ? false : _k, _l = _a.rootClassName, rootClassName = _l === void 0 ? '' : _l, _m = _a.autoComplete, autoComplete = _m === void 0 ? 'off' : _m, _o = _a.helperText, helperText = _o === void 0 ? '' : _o, handleOnBlur = _a.handleOnBlur, _p = _a.readOnly, readOnly = _p === void 0 ? false : _p, _q = _a.noTrim, noTrim = _q === void 0 ? false : _q, ref = _a.ref, onKeyPress = _a.onKeyPress, defaultValue = _a.defaultValue, onKeyDown = _a.onKeyDown, required = _a.required, additionalErrorInfo = _a.additionalErrorInfo, _r = _a.inputWrapperClassName, inputWrapperClassName = _r === void 0 ? '' : _r;
28471
+ var name = _a.name, value = _a.value, error = _a.error, onChange = _a.onChange, _b = _a.onFocus, onFocus = _b === void 0 ? function (e) { } : _b, label = _a.label, _c = _a.type, type = _c === void 0 ? 'text' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.labelClassName, labelClassName = _e === void 0 ? '' : _e, _f = _a.placeholder, placeholder = _f === void 0 ? '' : _f, _g = _a.tabIndex, tabIndex = _g === void 0 ? 1 : _g, _h = _a.dataTestid, dataTestid = _h === void 0 ? '' : _h, _j = _a.isRequiredField, isRequiredField = _j === void 0 ? false : _j, _k = _a.autoFocus, autoFocus = _k === void 0 ? false : _k, _l = _a.rootClassName, rootClassName = _l === void 0 ? '' : _l, _m = _a.autoComplete, autoComplete = _m === void 0 ? 'off' : _m, _o = _a.helperText, helperText = _o === void 0 ? '' : _o, handleOnBlur = _a.handleOnBlur, _p = _a.readOnly, readOnly = _p === void 0 ? false : _p, _q = _a.noTrim, noTrim = _q === void 0 ? false : _q, ref = _a.ref, onKeyPress = _a.onKeyPress, defaultValue = _a.defaultValue, onKeyDown = _a.onKeyDown, required = _a.required, additionalErrorInfo = _a.additionalErrorInfo;
28472
28472
  function handleError(error) {
28473
28473
  if (!Array.isArray(error)) {
28474
28474
  return [error];
@@ -28517,7 +28517,7 @@ function CustomInput(_a) {
28517
28517
  return (jsxRuntime.jsx("label", __assign({ className: "form__label ".concat(labelClassName), "data-testid": "label-".concat(dataTestid) }, { children: renderInputLabelConditionally() })));
28518
28518
  }
28519
28519
  };
28520
- return (jsxRuntime.jsxs("div", __assign({ className: "flex column left top ".concat(inputWrapperClassName) }, { children: [renderInputLabel(), jsxRuntime.jsx("input", { "data-testid": dataTestid, type: type, name: name, autoComplete: autoComplete, className: "form__input ".concat(rootClassName), onChange: function (e) {
28520
+ return (jsxRuntime.jsxs("div", __assign({ className: "flex column left top" }, { children: [renderInputLabel(), jsxRuntime.jsx("input", { "data-testid": dataTestid, type: type, name: name, autoComplete: autoComplete, className: "form__input ".concat(rootClassName), onChange: function (e) {
28521
28521
  e.persist();
28522
28522
  onChange(e);
28523
28523
  }, onBlur: onBlur, onFocus: onFocus, placeholder: placeholder, value: value, disabled: disabled, tabIndex: tabIndex, autoFocus: autoFocus, readOnly: readOnly, ref: ref, onKeyPress: onKeyPress, defaultValue: defaultValue, onKeyDown: onKeyDown, required: required }), getInputError(), helperText && (jsxRuntime.jsxs("div", __assign({ className: "form__text-field-info" }, { children: [jsxRuntime.jsx(SvgIcInfoFilled, { className: "form__icon form__icon--info" }), jsxRuntime.jsx("p", __assign({ className: "sentence-case" }, { children: helperText }))] })))] })));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtron-labs/devtron-fe-common-lib",
3
- "version": "0.0.54-beta-1",
3
+ "version": "0.0.54",
4
4
  "description": "Supporting common component library",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -28,8 +28,7 @@ export function CustomInput({
28
28
  defaultValue,
29
29
  onKeyDown,
30
30
  required,
31
- additionalErrorInfo,
32
- inputWrapperClassName = ''
31
+ additionalErrorInfo
33
32
  }: CustomInputProps) {
34
33
 
35
34
  function handleError(error: any): any[] {
@@ -93,7 +92,7 @@ export function CustomInput({
93
92
  }
94
93
 
95
94
  return (
96
- <div className={`flex column left top ${inputWrapperClassName}`}>
95
+ <div className="flex column left top">
97
96
  {renderInputLabel()}
98
97
  <input
99
98
  data-testid={dataTestid}
@@ -27,5 +27,4 @@ export interface CustomInputProps {
27
27
  onKeyDown?: (e) => void
28
28
  required?: boolean
29
29
  additionalErrorInfo?: React.ReactNode
30
- inputWrapperClassName?: string
31
30
  }