hplx-react-elements-dev 1.0.79 → 1.0.81

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 { CheckboxProps } from "../types";
3
- declare const Checkbox: ({ size, text, secondaryText, disabled, onClick }: CheckboxProps) => JSX.Element;
3
+ declare const Checkbox: ({ size, text, secondaryText, disabled, isMarked, onClick }: CheckboxProps) => JSX.Element;
4
4
  export default Checkbox;
package/dist/esm/index.js CHANGED
@@ -3565,12 +3565,14 @@ var Checkbox = function Checkbox(_a) {
3565
3565
  secondaryText = _a.secondaryText,
3566
3566
  _c = _a.disabled,
3567
3567
  disabled = _c === void 0 ? false : _c,
3568
- _d = _a.onClick,
3569
- onClick = _d === void 0 ? function () {} : _d;
3568
+ _d = _a.isMarked,
3569
+ isMarked = _d === void 0 ? false : _d,
3570
+ _e = _a.onClick,
3571
+ onClick = _e === void 0 ? function () {} : _e;
3570
3572
 
3571
- var _e = useState(false),
3572
- isChecked = _e[0],
3573
- setCheck = _e[1];
3573
+ var _f = useState(false),
3574
+ isChecked = _f[0],
3575
+ setCheck = _f[1];
3574
3576
 
3575
3577
  var OnButtonClick = function OnButtonClick() {
3576
3578
  onClick();
@@ -3579,6 +3581,9 @@ var Checkbox = function Checkbox(_a) {
3579
3581
  });
3580
3582
  };
3581
3583
 
3584
+ useEffect(function () {
3585
+ setCheck(isMarked);
3586
+ }, [isMarked]);
3582
3587
  return jsxRuntime.exports.jsxs("div", __assign({
3583
3588
  className: "hplxt-flex"
3584
3589
  }, {
@@ -17696,28 +17701,32 @@ var InputTag = function InputTag(_a) {
17696
17701
  _g = _a.onDropdownClick,
17697
17702
  onDropdownClick = _g === void 0 ? function (_) {} : _g,
17698
17703
  _h = _a.allowDuplicates,
17699
- allowDuplicates = _h === void 0 ? false : _h;
17700
-
17701
- var _j = inputProps || {},
17702
- disabled = _j.disabled,
17703
- onFocus = _j.onFocus,
17704
- onBlur = _j.onBlur;
17704
+ allowDuplicates = _h === void 0 ? false : _h,
17705
+ _j = _a.getInputValue,
17706
+ getInputValue = _j === void 0 ? function (input) {
17707
+ return input;
17708
+ } : _j;
17705
17709
 
17706
- var _k = useState(false),
17707
- active = _k[0],
17708
- setActive = _k[1];
17710
+ var _k = inputProps || {},
17711
+ disabled = _k.disabled,
17712
+ onFocus = _k.onFocus,
17713
+ onBlur = _k.onBlur;
17709
17714
 
17710
17715
  var _l = useState(false),
17711
- showDropdown = _l[0],
17712
- setShowDropdown = _l[1];
17716
+ active = _l[0],
17717
+ setActive = _l[1];
17713
17718
 
17714
- var _m = useState(""),
17715
- dropdownOffset = _m[0],
17716
- setdropdownOffset = _m[1];
17719
+ var _m = useState(false),
17720
+ showDropdown = _m[0],
17721
+ setShowDropdown = _m[1];
17717
17722
 
17718
17723
  var _o = useState(""),
17719
- value = _o[0],
17720
- setValue = _o[1]; // tag string
17724
+ dropdownOffset = _o[0],
17725
+ setdropdownOffset = _o[1];
17726
+
17727
+ var _p = useState(""),
17728
+ value = _p[0],
17729
+ setValue = _p[1]; // tag string
17721
17730
 
17722
17731
 
17723
17732
  var wrapperRef = useRef(null);
@@ -17726,47 +17735,47 @@ var InputTag = function InputTag(_a) {
17726
17735
  var editRef = useRef(null);
17727
17736
  var spanRef = useRef(null);
17728
17737
 
17729
- var _p = useState([]),
17730
- dropdownArr = _p[0],
17731
- setDropdownArr = _p[1];
17738
+ var _q = useState([]),
17739
+ dropdownArr = _q[0],
17740
+ setDropdownArr = _q[1];
17732
17741
 
17733
- var _q = useState(""),
17734
- tagInputValue = _q[0],
17735
- setTagInputValue = _q[1]; // input field state
17742
+ var _r = useState(""),
17743
+ tagInputValue = _r[0],
17744
+ setTagInputValue = _r[1]; // input field state
17736
17745
 
17737
17746
 
17738
- var _r = useState(__spreadArray(__spreadArray([], tagList.filter(Boolean), true), tagString.split(",").filter(Boolean).map(function (item) {
17747
+ var _s = useState(__spreadArray(__spreadArray([], tagList.filter(Boolean), true), tagString.split(",").filter(Boolean).map(function (item) {
17739
17748
  return item.trim();
17740
17749
  }), true)),
17741
- tags = _r[0],
17742
- setTags = _r[1]; // tag array
17750
+ tags = _s[0],
17751
+ setTags = _s[1]; // tag array
17743
17752
 
17744
17753
 
17745
- var _s = useState(-1),
17746
- focusIndex = _s[0],
17747
- setFocusIndex = _s[1];
17754
+ var _t = useState(-1),
17755
+ focusIndex = _t[0],
17756
+ setFocusIndex = _t[1];
17748
17757
 
17749
- var _t = useState(true),
17750
- changeLeft = _t[0],
17751
- setChangeLeft = _t[1];
17758
+ var _u = useState(true),
17759
+ changeLeft = _u[0],
17760
+ setChangeLeft = _u[1];
17752
17761
 
17753
- var _u = useState(-1),
17754
- editIndex = _u[0],
17755
- setEditIndex = _u[1];
17762
+ var _v = useState(-1),
17763
+ editIndex = _v[0],
17764
+ setEditIndex = _v[1];
17756
17765
 
17757
- var _v = useState(""),
17758
- editInputValue = _v[0],
17759
- setEditInputValue = _v[1];
17766
+ var _w = useState(""),
17767
+ editInputValue = _w[0],
17768
+ setEditInputValue = _w[1];
17760
17769
 
17761
17770
  var dropdownClickedRef = useRef(false);
17762
17771
 
17763
- var _w = useState(""),
17764
- content = _w[0],
17765
- setContent = _w[1];
17772
+ var _x = useState(""),
17773
+ content = _x[0],
17774
+ setContent = _x[1];
17766
17775
 
17767
- var _x = useState(0),
17768
- width = _x[0],
17769
- setWidth = _x[1]; // Handle the change event of the input element
17776
+ var _y = useState(0),
17777
+ width = _y[0],
17778
+ setWidth = _y[1]; // Handle the change event of the input element
17770
17779
 
17771
17780
 
17772
17781
  var handleValueChange = function handleValueChange(e) {
@@ -18087,6 +18096,7 @@ var InputTag = function InputTag(_a) {
18087
18096
  className: "hplxt-flex-1 placeholder:hplxt-text-Gray-500 focus-visible:hplxt-outline-0 hplxt-border-0 focus:hplxt-border-0",
18088
18097
  placeholder: "Enter Text",
18089
18098
  onChange: function onChange(e) {
18099
+ getInputValue(e.target.value);
18090
18100
  setTagInputValue(e.target.value);
18091
18101
  handleValueChange(e);
18092
18102
  },
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { InputTagProps } from "../types";
3
- declare const InputTag: ({ inputProps, className, dropdownClassName, options, tagList, tagString, handleValChange, onDropdownClick, allowDuplicates, }: InputTagProps) => JSX.Element;
3
+ declare const InputTag: ({ inputProps, className, dropdownClassName, options, tagList, tagString, handleValChange, onDropdownClick, allowDuplicates, getInputValue, }: InputTagProps) => JSX.Element;
4
4
  export default InputTag;
@@ -172,6 +172,7 @@ export interface CheckboxProps {
172
172
  secondaryText?: string;
173
173
  disabled?: boolean;
174
174
  onClick?: () => void;
175
+ isMarked?: boolean;
175
176
  }
176
177
  type ButtonGroupOptionType = {
177
178
  value?: string;
@@ -437,5 +438,6 @@ export interface InputTagProps {
437
438
  inputProps?: React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>;
438
439
  handleValChange?: (value: any) => void;
439
440
  allowDuplicates?: boolean;
441
+ getInputValue?: (value: string) => void;
440
442
  }
441
443
  export {};
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "frontend",
10
10
  "healthplix"
11
11
  ],
12
- "version": "1.0.79",
12
+ "version": "1.0.81",
13
13
  "main": "dist/esm/index.js",
14
14
  "module": "dist/esm/index.js",
15
15
  "types": "dist/esm/index.d.ts",