hplx-react-elements-dev 1.0.31 → 1.0.33

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, 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, 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
@@ -2102,6 +2102,9 @@ var DropdownItems = function DropdownItems(_a) {
2102
2102
 
2103
2103
  var InputField = function InputField(_a) {
2104
2104
  var label = _a.label,
2105
+ labelColor = _a.labelColor,
2106
+ labelSize = _a.labelSize,
2107
+ height = _a.height,
2105
2108
  _b = _a.start_icon,
2106
2109
  start_icon = _b === void 0 ? "" : _b,
2107
2110
  _c = _a.end_icon,
@@ -2195,16 +2198,16 @@ var InputField = function InputField(_a) {
2195
2198
  }); // console.log("Input Field",suffixDropdown)
2196
2199
 
2197
2200
  return jsxRuntime.exports.jsxs("div", __assign({
2198
- className: "inputfield"
2201
+ className: "inputfield "
2199
2202
  }, {
2200
2203
  children: [jsxRuntime.exports.jsxs("div", __assign({
2201
2204
  className: "flex justify-between"
2202
2205
  }, {
2203
2206
  children: [Boolean(label) && jsxRuntime.exports.jsx("div", __assign({
2204
- className: "text-Gray-700 mb-1"
2207
+ className: "".concat(labelColor ? labelColor : "text-Gray-700", " mb-1")
2205
2208
  }, {
2206
2209
  children: jsxRuntime.exports.jsx(Typography, __assign({
2207
- type: "Text sm",
2210
+ type: "".concat(labelSize ? labelSize : "Text sm"),
2208
2211
  variant: "Medium"
2209
2212
  }, {
2210
2213
  children: label
@@ -2225,7 +2228,7 @@ var InputField = function InputField(_a) {
2225
2228
  }, {
2226
2229
  children: jsxRuntime.exports.jsxs("div", __assign({
2227
2230
  "data-setid": "error-msg",
2228
- 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") : " ")))
2231
+ 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") : " ")))
2229
2232
  }, {
2230
2233
  children: [Boolean(prefix) && jsxRuntime.exports.jsx("div", __assign({
2231
2234
  "data-testid": "input-prefix",
@@ -2342,6 +2345,9 @@ var InputFieldSplit = function InputFieldSplit(_a) {
2342
2345
  var _b;
2343
2346
 
2344
2347
  var label = _a.label,
2348
+ labelColor = _a.labelColor,
2349
+ labelSize = _a.labelSize,
2350
+ height = _a.height,
2345
2351
  _c = _a.start_icon,
2346
2352
  start_icon = _c === void 0 ? "" : _c,
2347
2353
  _d = _a.end_icon,
@@ -2406,10 +2412,10 @@ var InputFieldSplit = function InputFieldSplit(_a) {
2406
2412
  className: "flex justify-between"
2407
2413
  }, {
2408
2414
  children: [Boolean(label) && jsxRuntime.exports.jsx("div", __assign({
2409
- className: "text-Gray-700 mb-1"
2415
+ className: "".concat(labelColor ? labelColor : "text-Gray-700", " mb-1")
2410
2416
  }, {
2411
2417
  children: jsxRuntime.exports.jsx(Typography, __assign({
2412
- type: "Text sm",
2418
+ type: "".concat(labelSize ? labelSize : "Text sm"),
2413
2419
  variant: "Medium"
2414
2420
  }, {
2415
2421
  children: label
@@ -2429,7 +2435,7 @@ var InputFieldSplit = function InputFieldSplit(_a) {
2429
2435
  type: "Text md"
2430
2436
  }, {
2431
2437
  children: jsxRuntime.exports.jsxs("div", __assign({
2432
- 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")))
2438
+ 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")))
2433
2439
  }, {
2434
2440
  children: [Boolean(prefix) && jsxRuntime.exports.jsx("div", __assign({
2435
2441
  "data-testid": "input-prefix",
@@ -5170,6 +5176,8 @@ var AddSuggestion = function AddSuggestion(_a) {
5170
5176
  var _b = _a.isInputField,
5171
5177
  isInputField = _b === void 0 ? false : _b,
5172
5178
  label = _a.label,
5179
+ labelColor = _a.labelColor,
5180
+ labelSize = _a.labelSize,
5173
5181
  _c = _a.start_icon,
5174
5182
  start_icon = _c === void 0 ? "" : _c,
5175
5183
  _d = _a.end_icon,
@@ -5278,6 +5286,8 @@ var AddSuggestion = function AddSuggestion(_a) {
5278
5286
  }, {
5279
5287
  children: [isInputField ? jsxRuntime.exports.jsx(InputField, {
5280
5288
  label: label,
5289
+ labelColor: labelColor,
5290
+ labelSize: labelSize,
5281
5291
  start_icon: start_icon,
5282
5292
  end_icon: end_icon,
5283
5293
  prefix: prefix,
@@ -16893,6 +16903,9 @@ var DatePicker = function DatePicker(_a) {
16893
16903
  setClicked(!clicked);
16894
16904
  };
16895
16905
 
16906
+ useEffect(function () {
16907
+ if (selectDate) setDate(undefined);
16908
+ }, [selectDate]);
16896
16909
  useEffect(function () {
16897
16910
  var handleClickOutside = function handleClickOutside() {
16898
16911
  return setClicked(false);
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { InputFieldProps } from "../types";
3
- declare const InputField: ({ label, 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, 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;
@@ -1,6 +1,9 @@
1
1
  import { ReactNode } from "react";
2
2
  export interface InputFieldProps {
3
3
  label?: string;
4
+ labelSize?: typographyTextType;
5
+ labelColor?: string;
6
+ height?: string;
4
7
  prefix?: ReactNode;
5
8
  suffixButton?: ReactNode;
6
9
  suffix?: ReactNode;
@@ -20,6 +23,9 @@ export interface InputFieldProps {
20
23
  }
21
24
  export interface InputFieldSplitProps {
22
25
  label?: string;
26
+ labelSize?: typographyTextType;
27
+ height?: string;
28
+ labelColor?: string;
23
29
  prefix?: ReactNode;
24
30
  suffix?: ReactNode;
25
31
  start_icon?: string;
@@ -293,6 +299,8 @@ export interface AddSuggestionProps {
293
299
  label?: string;
294
300
  isInputField?: boolean;
295
301
  height?: string;
302
+ labelSize?: typographyTextType;
303
+ labelColor?: string;
296
304
  prefix?: ReactNode;
297
305
  suffixButton?: ReactNode;
298
306
  suffixDropdown?: any;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "frontend",
10
10
  "healthplix"
11
11
  ],
12
- "version": "1.0.31",
12
+ "version": "1.0.33",
13
13
  "main": "dist/esm/index.js",
14
14
  "module": "dist/esm/index.js",
15
15
  "types": "dist/esm/index.d.ts",