hplx-react-elements-dev 1.1.12 → 1.1.14

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, isMarked, onClick }: CheckboxProps) => JSX.Element;
3
+ declare const Checkbox: ({ size, text, secondaryText, disabled, isMarked, onClick, id, }: CheckboxProps) => JSX.Element;
4
4
  export default Checkbox;
package/dist/esm/index.js CHANGED
@@ -3760,14 +3760,15 @@ var Checkbox = function Checkbox(_a) {
3760
3760
  _d = _a.isMarked,
3761
3761
  isMarked = _d === void 0 ? false : _d,
3762
3762
  _e = _a.onClick,
3763
- onClick = _e === void 0 ? function () {} : _e;
3763
+ onClick = _e === void 0 ? function () {} : _e,
3764
+ id = _a.id;
3764
3765
 
3765
3766
  var _f = useState(false),
3766
3767
  isChecked = _f[0],
3767
3768
  setCheck = _f[1];
3768
3769
 
3769
3770
  var OnButtonClick = function OnButtonClick() {
3770
- onClick();
3771
+ onClick(id);
3771
3772
  setCheck(function (prevValue) {
3772
3773
  return !prevValue;
3773
3774
  });
@@ -3777,7 +3778,8 @@ var Checkbox = function Checkbox(_a) {
3777
3778
  setCheck(isMarked);
3778
3779
  }, [isMarked]);
3779
3780
  return jsxRuntime.exports.jsxs("div", __assign({
3780
- className: "hplxt-flex"
3781
+ className: "hplxt-flex",
3782
+ id: id
3781
3783
  }, {
3782
3784
  children: [jsxRuntime.exports.jsx("div", {
3783
3785
  "data-testid": "box",
@@ -4834,7 +4836,8 @@ var RadioBtn = function RadioBtn(_a) {
4834
4836
  secondaryText = _a.secondaryText,
4835
4837
  className = _a.className,
4836
4838
  value = _a.value,
4837
- onChange = _a.onChange;
4839
+ onChange = _a.onChange,
4840
+ checked = _a.checked;
4838
4841
  return jsxRuntime.exports.jsx("div", __assign({
4839
4842
  className: "radiobutton"
4840
4843
  }, {
@@ -4845,11 +4848,12 @@ var RadioBtn = function RadioBtn(_a) {
4845
4848
  className: "hplxt-sr-only hplxt-peer hplxt-border-0 focus:hplxt-border-0",
4846
4849
  type: "radio",
4847
4850
  value: value,
4848
- name: 'radioBtn',
4851
+ name: "radioBtn",
4849
4852
  id: id,
4850
4853
  "data-testid": id,
4851
4854
  disabled: disabled,
4852
- onChange: onChange
4855
+ onChange: onChange,
4856
+ checked: checked
4853
4857
  }), jsxRuntime.exports.jsx("label", {
4854
4858
  className: "".concat(getPaddingClassName(size, disabled)),
4855
4859
  htmlFor: id
@@ -1,4 +1,4 @@
1
1
  /// <reference types="react" />
2
2
  import { RadioBtnProps } from "../types";
3
- declare const RadioBtn: ({ size, disabled, iconfile, id, text, secondaryText, className, value, onChange }: RadioBtnProps) => JSX.Element;
3
+ declare const RadioBtn: ({ size, disabled, iconfile, id, text, secondaryText, className, value, onChange, checked, }: RadioBtnProps) => JSX.Element;
4
4
  export default RadioBtn;
@@ -192,8 +192,9 @@ export interface CheckboxProps {
192
192
  text: string;
193
193
  secondaryText?: string;
194
194
  disabled?: boolean;
195
- onClick?: () => void;
195
+ onClick?: (id: CheckboxProps) => void;
196
196
  isMarked?: boolean;
197
+ id?: any;
197
198
  }
198
199
  type ButtonGroupOptionType = {
199
200
  value?: string;
@@ -297,7 +298,8 @@ export interface RadioBtnProps {
297
298
  id: any;
298
299
  value: string;
299
300
  className?: any;
300
- onChange: () => void;
301
+ onChange: (event: any) => void;
302
+ checked?: any;
301
303
  }
302
304
  export type ToggleSwitchThemeType = "Dark" | "Light";
303
305
  export type ToggleSwitchSizeType = "sm" | "md";
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "frontend",
10
10
  "healthplix"
11
11
  ],
12
- "version": "1.1.12",
12
+ "version": "1.1.14",
13
13
  "main": "dist/esm/index.js",
14
14
  "module": "dist/esm/index.js",
15
15
  "types": "dist/esm/index.d.ts",