hplx-react-elements-dev 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.
package/dist/esm/index.js CHANGED
@@ -2104,6 +2104,7 @@ var InputField = function InputField(_a) {
2104
2104
  var label = _a.label,
2105
2105
  labelColor = _a.labelColor,
2106
2106
  labelSize = _a.labelSize,
2107
+ height = _a.height,
2107
2108
  _b = _a.start_icon,
2108
2109
  start_icon = _b === void 0 ? "" : _b,
2109
2110
  _c = _a.end_icon,
@@ -2118,6 +2119,7 @@ var InputField = function InputField(_a) {
2118
2119
  _e = _a.errorMsg,
2119
2120
  errorMsg = _e === void 0 ? "" : _e,
2120
2121
  inputProps = _a.inputProps,
2122
+ suffixInputProps = _a.suffixInputProps,
2121
2123
  _f = _a.isborderRequired,
2122
2124
  isborderRequired = _f === void 0 ? true : _f,
2123
2125
  suffixDropdown = _a.suffixDropdown,
@@ -2227,7 +2229,7 @@ var InputField = function InputField(_a) {
2227
2229
  }, {
2228
2230
  children: jsxRuntime.exports.jsxs("div", __assign({
2229
2231
  "data-setid": "error-msg",
2230
- className: "flex ".concat(isborderRequired ? "border-1 shadow-xs rounded-lg" : "", " overflow-hidden placeholder:text-Gray-500 ").concat(errorMsg ? "border-Error-300" : "border-Gray-300", " h-10 ").concat(disabled ? "bg-Gray-50" : "bg-White ".concat(errorMsg ? "hover:shadow-xs-error ".concat(active && "shadow-xs-error") : " ".concat(isborderRequired ? "hover:border-Primary-300 hover:shadow-xs-primary ".concat(active && "border-Primary-300 shadow-xs-primary") : " ")))
2232
+ className: "flex ".concat(isborderRequired ? "border-1 shadow-xs rounded-lg" : "", " overflow-hidden placeholder:text-Gray-500 ").concat(errorMsg ? "border-Error-300" : "border-Gray-300", " ").concat(height ? height : "h-10", " ").concat(disabled ? "bg-Gray-50" : "bg-White ".concat(errorMsg ? "hover:shadow-xs-error ".concat(active && "shadow-xs-error") : " ".concat(isborderRequired ? "hover:border-Primary-300 hover:shadow-xs-primary ".concat(active && "border-Primary-300 shadow-xs-primary") : " ")))
2231
2233
  }, {
2232
2234
  children: [Boolean(prefix) && jsxRuntime.exports.jsx("div", __assign({
2233
2235
  "data-testid": "input-prefix",
@@ -2271,7 +2273,7 @@ var InputField = function InputField(_a) {
2271
2273
  }, {
2272
2274
  children: suffix
2273
2275
  }))
2274
- })), Boolean(suffix) && isSuffixEditable && jsxRuntime.exports.jsxs("div", {
2276
+ })), isSuffixEditable && jsxRuntime.exports.jsxs("div", {
2275
2277
  children: [jsxRuntime.exports.jsx("div", __assign({
2276
2278
  "data-testid": "input-suffix",
2277
2279
  className: "bg-Gray-50 border-l-1 border-l-Gray-300 text-Gray-500 flex items-center pr-3 pl-[14px]",
@@ -2279,17 +2281,17 @@ var InputField = function InputField(_a) {
2279
2281
  return setShowSuffixDropdown(true);
2280
2282
  }
2281
2283
  }, {
2282
- children: isSuffixEditable && jsxRuntime.exports.jsx("input", {
2284
+ children: isSuffixEditable && jsxRuntime.exports.jsx("input", __assign({
2283
2285
  type: "text",
2284
2286
  className: "flex-1 pl-[4px] w-36 pr-[1px] bg-Gray-50 py-2 focus-visible:outline-0 border-0 focus:border-0",
2285
2287
  "data-testid": "text-input",
2286
- placeholder: suffixPlaceholder,
2287
- // {...inputProps}
2288
+ placeholder: suffixPlaceholder
2289
+ }, suffixInputProps, {
2288
2290
  value: suffixValue,
2289
2291
  onChange: function onChange(e) {
2290
2292
  return handleSuffixValueChange(e);
2291
2293
  }
2292
- })
2294
+ }))
2293
2295
  })), showSuffixDropdown && jsxRuntime.exports.jsx("div", __assign({
2294
2296
  ref: wrapperRef,
2295
2297
  className: "absolute mt-1 min-w-max rounded-lg bg-White overflow-y-auto shadow-md z-10 max-h-80 "
@@ -2344,6 +2346,9 @@ var InputFieldSplit = function InputFieldSplit(_a) {
2344
2346
  var _b;
2345
2347
 
2346
2348
  var label = _a.label,
2349
+ labelColor = _a.labelColor,
2350
+ labelSize = _a.labelSize,
2351
+ height = _a.height,
2347
2352
  _c = _a.start_icon,
2348
2353
  start_icon = _c === void 0 ? "" : _c,
2349
2354
  _d = _a.end_icon,
@@ -2408,10 +2413,10 @@ var InputFieldSplit = function InputFieldSplit(_a) {
2408
2413
  className: "flex justify-between"
2409
2414
  }, {
2410
2415
  children: [Boolean(label) && jsxRuntime.exports.jsx("div", __assign({
2411
- className: "text-Gray-700 mb-1"
2416
+ className: "".concat(labelColor ? labelColor : "text-Gray-700", " mb-1")
2412
2417
  }, {
2413
2418
  children: jsxRuntime.exports.jsx(Typography, __assign({
2414
- type: "Text sm",
2419
+ type: "".concat(labelSize ? labelSize : "Text sm"),
2415
2420
  variant: "Medium"
2416
2421
  }, {
2417
2422
  children: label
@@ -2431,7 +2436,7 @@ var InputFieldSplit = function InputFieldSplit(_a) {
2431
2436
  type: "Text md"
2432
2437
  }, {
2433
2438
  children: jsxRuntime.exports.jsxs("div", __assign({
2434
- className: "flex border-1 overflow-hidden placeholder:text-Gray-500 ".concat(errorMsg ? "border-Error-300" : "border-Gray-300", " shadow-xs rounded-lg h-10 ").concat(disabled ? "bg-Gray-50" : "bg-White ".concat(errorMsg ? "hover:shadow-xs-error ".concat((active[fieldNames[0]] || active[fieldNames[1]]) && "shadow-xs-error") : "hover:border-Primary-300 hover:shadow-xs-primary ".concat((active[fieldNames[0]] || active[fieldNames[1]]) && "border-Primary-300 shadow-xs-primary")))
2439
+ className: "flex border-1 overflow-hidden placeholder:text-Gray-500 ".concat(errorMsg ? "border-Error-300" : "border-Gray-300", " shadow-xs rounded-lg ").concat(height ? height : "h-10", " ").concat(disabled ? "bg-Gray-50" : "bg-White ".concat(errorMsg ? "hover:shadow-xs-error ".concat((active[fieldNames[0]] || active[fieldNames[1]]) && "shadow-xs-error") : "hover:border-Primary-300 hover:shadow-xs-primary ".concat((active[fieldNames[0]] || active[fieldNames[1]]) && "border-Primary-300 shadow-xs-primary")))
2435
2440
  }, {
2436
2441
  children: [Boolean(prefix) && jsxRuntime.exports.jsx("div", __assign({
2437
2442
  "data-testid": "input-prefix",
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { InputFieldProps } from "../types";
3
- declare const InputField: ({ label, labelColor, labelSize, 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;
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { InputFieldSplitProps } from "../types";
3
- declare const InputFieldSplit: ({ label, start_icon, end_icon, hint_text_icon, prefix, suffix, hint_text, fieldNames, char_count, errorMsg, onChange, value, inputProps, }: InputFieldSplitProps) => JSX.Element;
3
+ declare const InputFieldSplit: ({ label, labelColor, labelSize, height, start_icon, end_icon, hint_text_icon, prefix, suffix, hint_text, fieldNames, char_count, errorMsg, onChange, value, inputProps, }: InputFieldSplitProps) => JSX.Element;
4
4
  export default InputFieldSplit;
@@ -3,6 +3,7 @@ export interface InputFieldProps {
3
3
  label?: string;
4
4
  labelSize?: typographyTextType;
5
5
  labelColor?: string;
6
+ height?: string;
6
7
  prefix?: ReactNode;
7
8
  suffixButton?: ReactNode;
8
9
  suffix?: ReactNode;
@@ -14,6 +15,7 @@ export interface InputFieldProps {
14
15
  errorMsg?: string;
15
16
  isborderRequired?: boolean;
16
17
  inputProps: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
18
+ suffixInputProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
17
19
  suffixPlaceholder?: string;
18
20
  suffixDropdown?: any;
19
21
  handleSuffixClick?: (value: any) => void;
@@ -22,6 +24,9 @@ export interface InputFieldProps {
22
24
  }
23
25
  export interface InputFieldSplitProps {
24
26
  label?: string;
27
+ labelSize?: typographyTextType;
28
+ height?: string;
29
+ labelColor?: string;
25
30
  prefix?: ReactNode;
26
31
  suffix?: ReactNode;
27
32
  start_icon?: string;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "frontend",
10
10
  "healthplix"
11
11
  ],
12
- "version": "1.0.32",
12
+ "version": "1.0.34",
13
13
  "main": "dist/esm/index.js",
14
14
  "module": "dist/esm/index.js",
15
15
  "types": "dist/esm/index.d.ts",