@luscii-healthtech/web-ui 2.5.0 → 2.5.1

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,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { CheckboxGroupProps } from "./CheckboxList.types";
3
- export declare const CheckboxGroup: ({ title, items, onChange, className }: CheckboxGroupProps) => JSX.Element;
3
+ export declare const CheckboxGroup: ({ title, items, onChange, className, isCollapsed, }: CheckboxGroupProps) => JSX.Element;
@@ -13,6 +13,7 @@ export interface CheckboxGroupProps {
13
13
  items: CheckboxListItem[];
14
14
  onChange: (event: CheckboxChangeEvent) => void;
15
15
  className?: string;
16
+ isCollapsed?: boolean;
16
17
  }
17
18
  export interface CheckboxGroupItemProps {
18
19
  id: string;
@@ -30,6 +31,7 @@ export interface CheckboxListItem {
30
31
  export interface CheckboxGroup {
31
32
  title?: string;
32
33
  items: CheckboxListItem[];
34
+ isCollapsed?: boolean;
33
35
  }
34
36
  export interface CheckboxChangeEvent {
35
37
  id: string;
@@ -3199,13 +3199,15 @@ var CheckboxGroup = function CheckboxGroup(_ref) {
3199
3199
  var title = _ref.title,
3200
3200
  items = _ref.items,
3201
3201
  onChange = _ref.onChange,
3202
- className = _ref.className;
3202
+ className = _ref.className,
3203
+ _ref$isCollapsed = _ref.isCollapsed,
3204
+ isCollapsed = _ref$isCollapsed === void 0 ? true : _ref$isCollapsed;
3203
3205
 
3204
3206
  var _useState = React.useState(CheckboxState.UNCHECKED),
3205
3207
  groupCheckboxState = _useState[0],
3206
3208
  setGroupCheckboxState = _useState[1];
3207
3209
 
3208
- var _useState2 = React.useState(true),
3210
+ var _useState2 = React.useState(isCollapsed),
3209
3211
  collapsed = _useState2[0],
3210
3212
  setCollapsed = _useState2[1];
3211
3213
 
@@ -3276,7 +3278,7 @@ var CheckboxGroup = function CheckboxGroup(_ref) {
3276
3278
  type: "strong",
3277
3279
  text: groupTitle || "",
3278
3280
  className: " ml-4"
3279
- }), " :"), /*#__PURE__*/React__default.createElement(Checkbox, {
3281
+ }), " ", ":"), /*#__PURE__*/React__default.createElement(Checkbox, {
3280
3282
  onChange: handleGroupClick,
3281
3283
  className: "ml-auto",
3282
3284
  isChecked: groupCheckboxState === CheckboxState.CHECKED,
@@ -3305,6 +3307,7 @@ var CheckboxList = function CheckboxList(_ref) {
3305
3307
  key: group.title,
3306
3308
  items: group.items,
3307
3309
  title: group.title,
3310
+ isCollapsed: group.isCollapsed,
3308
3311
  onChange: onChange
3309
3312
  });
3310
3313
  } else {