hplx-react-elements-dev 1.0.33 → 1.0.35

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,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { AddSuggestionProps } from "../types";
3
- declare const AddSuggestion: ({ isInputField, label, labelColor, labelSize, start_icon, end_icon, prefix, suffixButton, suffix, suffixDropdown, isSuffixEditable, suffixPlaceholder, handleSuggestionValChange, handleSuffixValChange, handleSuffixClick, char_count, onSuggestionClick, height, hint_text_icon, hint_text, errorMsg, inputProps, inputFieldInputProps, options, suggestionValue, isborderRequired, }: AddSuggestionProps) => JSX.Element;
3
+ declare const AddSuggestion: ({ isInputField, label, labelColor, labelSize, start_icon, end_icon, prefix, suffixButton, suffix, suffixDropdown, isSuffixEditable, suffixInputProps, suffixPlaceholder, handleSuggestionValChange, handleSuffixValChange, handleSuffixClick, char_count, onSuggestionClick, height, hint_text_icon, hint_text, errorMsg, inputProps, inputFieldInputProps, options, suggestionValue, isborderRequired, }: AddSuggestionProps) => JSX.Element;
4
4
  export default AddSuggestion;
package/dist/esm/index.js CHANGED
@@ -2119,6 +2119,7 @@ var InputField = function InputField(_a) {
2119
2119
  _e = _a.errorMsg,
2120
2120
  errorMsg = _e === void 0 ? "" : _e,
2121
2121
  inputProps = _a.inputProps,
2122
+ suffixInputProps = _a.suffixInputProps,
2122
2123
  _f = _a.isborderRequired,
2123
2124
  isborderRequired = _f === void 0 ? true : _f,
2124
2125
  suffixDropdown = _a.suffixDropdown,
@@ -2126,9 +2127,8 @@ var InputField = function InputField(_a) {
2126
2127
  isSuffixEditable = _g === void 0 ? false : _g,
2127
2128
  suffixPlaceholder = _a.suffixPlaceholder,
2128
2129
  _h = _a.handleSuffixClick,
2129
- handleSuffixClick = _h === void 0 ? function (_) {} : _h,
2130
- _j = _a.handleSuffixValChange,
2131
- handleSuffixValChange = _j === void 0 ? function (_) {} : _j;
2130
+ handleSuffixClick = _h === void 0 ? function (_) {} : _h;
2131
+ _a.handleSuffixValChange;
2132
2132
 
2133
2133
  var _k = inputProps || {},
2134
2134
  disabled = _k.disabled,
@@ -2178,13 +2178,13 @@ var InputField = function InputField(_a) {
2178
2178
  setSuffixFilterList(sug);
2179
2179
  }
2180
2180
 
2181
- setSuffixValue && setSuffixValue(e.target.value);
2182
- handleSuffixValChange(e.target.value);
2181
+ setSuffixValue && setSuffixValue(e.target.value); // handleSuffixValChange(e.target.value);
2183
2182
  };
2184
2183
 
2185
2184
  var handleClickOutside = function handleClickOutside(e) {
2186
2185
  if (wrapperRef.current && !wrapperRef.current.contains(e.target)) {
2187
2186
  setShowSuffixDropdown(false);
2187
+ setSuffixValue("");
2188
2188
  }
2189
2189
  };
2190
2190
 
@@ -2272,7 +2272,7 @@ var InputField = function InputField(_a) {
2272
2272
  }, {
2273
2273
  children: suffix
2274
2274
  }))
2275
- })), Boolean(suffix) && isSuffixEditable && jsxRuntime.exports.jsxs("div", {
2275
+ })), isSuffixEditable && jsxRuntime.exports.jsxs("div", {
2276
2276
  children: [jsxRuntime.exports.jsx("div", __assign({
2277
2277
  "data-testid": "input-suffix",
2278
2278
  className: "bg-Gray-50 border-l-1 border-l-Gray-300 text-Gray-500 flex items-center pr-3 pl-[14px]",
@@ -2280,17 +2280,17 @@ var InputField = function InputField(_a) {
2280
2280
  return setShowSuffixDropdown(true);
2281
2281
  }
2282
2282
  }, {
2283
- children: isSuffixEditable && jsxRuntime.exports.jsx("input", {
2283
+ children: isSuffixEditable && jsxRuntime.exports.jsx("input", __assign({
2284
2284
  type: "text",
2285
2285
  className: "flex-1 pl-[4px] w-36 pr-[1px] bg-Gray-50 py-2 focus-visible:outline-0 border-0 focus:border-0",
2286
2286
  "data-testid": "text-input",
2287
- placeholder: suffixPlaceholder,
2288
- // {...inputProps}
2287
+ placeholder: suffixPlaceholder
2288
+ }, suffixInputProps, {
2289
2289
  value: suffixValue,
2290
2290
  onChange: function onChange(e) {
2291
2291
  return handleSuffixValueChange(e);
2292
2292
  }
2293
- })
2293
+ }))
2294
2294
  })), showSuffixDropdown && jsxRuntime.exports.jsx("div", __assign({
2295
2295
  ref: wrapperRef,
2296
2296
  className: "absolute mt-1 min-w-max rounded-lg bg-White overflow-y-auto shadow-md z-10 max-h-80 "
@@ -5189,6 +5189,7 @@ var AddSuggestion = function AddSuggestion(_a) {
5189
5189
  suffixDropdown = _e === void 0 ? [] : _e,
5190
5190
  _f = _a.isSuffixEditable,
5191
5191
  isSuffixEditable = _f === void 0 ? false : _f,
5192
+ suffixInputProps = _a.suffixInputProps,
5192
5193
  _g = _a.suffixPlaceholder,
5193
5194
  suffixPlaceholder = _g === void 0 ? "" : _g,
5194
5195
  _h = _a.handleSuggestionValChange,
@@ -5303,6 +5304,7 @@ var AddSuggestion = function AddSuggestion(_a) {
5303
5304
  suffixPlaceholder: suffixPlaceholder,
5304
5305
  isborderRequired: isborderRequired,
5305
5306
  isSuffixEditable: isSuffixEditable,
5307
+ suffixInputProps: suffixInputProps,
5306
5308
  inputProps: __assign(__assign({}, inputFieldInputProps), {
5307
5309
  onChange: changeHandler,
5308
5310
  value: suggestionValue
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { InputFieldProps } from "../types";
3
- declare const InputField: ({ label, labelColor, labelSize, height, start_icon, end_icon, hint_text_icon, prefix, suffixButton, suffix, hint_text, char_count, errorMsg, inputProps, isborderRequired, suffixDropdown, isSuffixEditable, suffixPlaceholder, handleSuffixClick, handleSuffixValChange, }: InputFieldProps) => JSX.Element;
3
+ declare const InputField: ({ label, labelColor, labelSize, height, start_icon, end_icon, hint_text_icon, prefix, suffixButton, suffix, hint_text, char_count, errorMsg, inputProps, suffixInputProps, isborderRequired, suffixDropdown, isSuffixEditable, suffixPlaceholder, handleSuffixClick, handleSuffixValChange, }: InputFieldProps) => JSX.Element;
4
4
  export default InputField;
@@ -15,6 +15,7 @@ export interface InputFieldProps {
15
15
  errorMsg?: string;
16
16
  isborderRequired?: boolean;
17
17
  inputProps: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
18
+ suffixInputProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
18
19
  suffixPlaceholder?: string;
19
20
  suffixDropdown?: any;
20
21
  handleSuffixClick?: (value: any) => void;
@@ -316,6 +317,7 @@ export interface AddSuggestionProps {
316
317
  errorMsg?: string;
317
318
  inputProps?: React.DetailedHTMLProps<React.TextareaHTMLAttributes<HTMLTextAreaElement>, HTMLTextAreaElement>;
318
319
  inputFieldInputProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
320
+ suffixInputProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
319
321
  onSuggestionClick?: (selectedValue: any) => void;
320
322
  options?: Array<DropdownItemsProps>;
321
323
  suggestionValue?: string;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "frontend",
10
10
  "healthplix"
11
11
  ],
12
- "version": "1.0.33",
12
+ "version": "1.0.35",
13
13
  "main": "dist/esm/index.js",
14
14
  "module": "dist/esm/index.js",
15
15
  "types": "dist/esm/index.d.ts",