@apexcura/ui-components 0.0.16-Beta4 → 0.0.16-Beta6

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/index.js CHANGED
@@ -92197,7 +92197,7 @@ var PasswordElement = (props) => {
92197
92197
  },
92198
92198
  iconRender: renderVisibilityIcon,
92199
92199
  visibilityToggle: {
92200
- visible: passwordVisible,
92200
+ visible: passwordVisible && passwordVisible,
92201
92201
  onVisibleChange: handleVisibilityToggle
92202
92202
  }
92203
92203
  }
@@ -92344,19 +92344,20 @@ var RadioElement = (props) => {
92344
92344
  // src/Components/Checkbox.tsx
92345
92345
  var import_react140 = __toESM(require_react());
92346
92346
  var CheckboxGroup2 = checkbox_default.Group;
92347
- var defaultCheckedList = [];
92347
+ var defaultCheckedList = ["lakku"];
92348
92348
  var CheckboxElement = (props) => {
92349
92349
  const [checkedList, setCheckedList] = (0, import_react140.useState)(defaultCheckedList);
92350
- const checkAll = props.options && props.options.length === checkedList.length;
92350
+ const options = props.options || [];
92351
+ const checkAll = options.length > 0 && options.length === checkedList.length;
92351
92352
  const handleChange = (list) => {
92352
92353
  setCheckedList(list);
92353
92354
  if (props.onChange) {
92354
- const selectedOptions = props.options && props.options.filter((option) => list.includes(option.value));
92355
+ const selectedOptions = options.filter((option) => list.includes(option.value));
92355
92356
  props.onChange(selectedOptions);
92356
92357
  }
92357
92358
  };
92358
92359
  const onHandleAllChanges = (e) => {
92359
- const newList = e.target.checked ? props.options : [];
92360
+ const newList = e.target.checked ? options.map((option) => option.value) : [];
92360
92361
  setCheckedList(newList);
92361
92362
  if (props.onChange) {
92362
92363
  props.onChange(newList);
@@ -92379,8 +92380,8 @@ var CheckboxElement = (props) => {
92379
92380
  disabled: props.disabled,
92380
92381
  style: props.styles,
92381
92382
  className: props.className,
92382
- options: props.options,
92383
- value: checkedList,
92383
+ options,
92384
+ value: checkedList && checkedList,
92384
92385
  onChange: handleChange
92385
92386
  }
92386
92387
  ));