@true-engineering/true-react-common-ui-kit 3.11.0 → 3.12.0

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/README.md CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  # Release Notes
12
12
 
13
+ ## v3.12.0
14
+
15
+ ### Changes
16
+
17
+ - Удаляет `isSelected` внутри **Checkbox**
18
+ - Добавляет поддержку `isInvalid` для **Checkbox**
19
+ - Делает опциональным `value` для **Checkbox**
20
+ - Иконка `check-big` стала deprecated
21
+ - Иконки `check`, `check-all` и `minus` обновлены до актуальных из Figma UI Kit'а
22
+
13
23
  ## v3.11.0
14
24
 
15
25
  ### Changes
@@ -2,22 +2,23 @@ import { ReactNode, ChangeEvent, KeyboardEvent } from 'react';
2
2
  import { ICommonProps } from '../../types';
3
3
  import { ICheckboxStyles } from './Checkbox.styles';
4
4
  export interface ICheckboxProps<V> extends ICommonProps<ICheckboxStyles> {
5
+ value?: V;
5
6
  children?: ReactNode;
6
- isChecked: boolean | undefined;
7
+ /** @default false */
8
+ isChecked?: boolean;
7
9
  /** @default false */
8
10
  isSemiChecked?: boolean;
9
11
  /** @default false */
12
+ isInvalid?: boolean;
13
+ /** @default false */
10
14
  isDisabled?: boolean;
11
15
  /** @default false */
12
16
  isReadonly?: boolean;
13
- /** @default false */
14
- isInvalid?: boolean;
15
- value: V;
16
17
  /** @default 'right' */
17
18
  labelPosition?: 'right' | 'left';
18
- onSelect: (value: {
19
- value: V;
19
+ onSelect?: (value: {
20
+ value?: V;
20
21
  isSelected: boolean;
21
22
  }, event: ChangeEvent<HTMLInputElement> | KeyboardEvent) => void;
22
23
  }
23
- export declare function Checkbox<V>({ children, isDisabled, isReadonly, isChecked, value, data, testId, isSemiChecked, labelPosition, tweakStyles, onSelect, }: ICheckboxProps<V>): JSX.Element;
24
+ export declare function Checkbox<V>({ value, children, isChecked, isSemiChecked, isInvalid, isDisabled, isReadonly, labelPosition, data, testId, tweakStyles, onSelect, }: ICheckboxProps<V>): JSX.Element;
@@ -1,5 +1,8 @@
1
- import { ComponentStory } from '@storybook/react';
2
- import { Checkbox } from './Checkbox';
3
- declare const _default: import("@storybook/types").ComponentAnnotations<import("@storybook/react/dist/types-0fc72a6d").R, import("./Checkbox").ICheckboxProps<unknown>>;
4
- export default _default;
5
- export declare const Default: ComponentStory<typeof Checkbox>;
1
+ import { FC } from 'react';
2
+ import type { Meta, StoryObj } from '@storybook/react';
3
+ import { Checkbox as CheckboxComponent, ICheckboxProps } from './Checkbox';
4
+ declare const CheckboxComponentWithData: FC<ICheckboxProps<string>>;
5
+ declare const meta: Meta<typeof CheckboxComponentWithData>;
6
+ export default meta;
7
+ type Story = StoryObj<typeof CheckboxComponent>;
8
+ export declare const Default: Story;
@@ -1,3 +1,3 @@
1
1
  import { ITweakStyles } from '../../theme';
2
- export declare const useStyles: import("../../theme").IUseStyles<"input" | "root" | "disabled" | "children" | "check" | "checked" | "labelPositionLeft", unknown>;
2
+ export declare const useStyles: import("../../theme").IUseStyles<"input" | "invalid" | "root" | "disabled" | "children" | "checked" | "check" | "labelPositionLeft", unknown>;
3
3
  export type ICheckboxStyles = ITweakStyles<typeof useStyles>;
@@ -4600,7 +4600,7 @@ var phoneInfo = [
4600
4600
  ]
4601
4601
  }
4602
4602
  ];
4603
- function _array_like_to_array$s(arr, len) {
4603
+ function _array_like_to_array$r(arr, len) {
4604
4604
  if (len == null || len > arr.length)
4605
4605
  len = arr.length;
4606
4606
  for (var i = 0, arr2 = new Array(len); i < len; i++)
@@ -4609,7 +4609,7 @@ function _array_like_to_array$s(arr, len) {
4609
4609
  }
4610
4610
  function _array_without_holes$8(arr) {
4611
4611
  if (Array.isArray(arr))
4612
- return _array_like_to_array$s(arr);
4612
+ return _array_like_to_array$r(arr);
4613
4613
  }
4614
4614
  function _iterable_to_array$8(iter) {
4615
4615
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null)
@@ -4619,20 +4619,20 @@ function _non_iterable_spread$8() {
4619
4619
  throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4620
4620
  }
4621
4621
  function _to_consumable_array$8(arr) {
4622
- return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$s(arr) || _non_iterable_spread$8();
4622
+ return _array_without_holes$8(arr) || _iterable_to_array$8(arr) || _unsupported_iterable_to_array$r(arr) || _non_iterable_spread$8();
4623
4623
  }
4624
- function _unsupported_iterable_to_array$s(o, minLen) {
4624
+ function _unsupported_iterable_to_array$r(o, minLen) {
4625
4625
  if (!o)
4626
4626
  return;
4627
4627
  if (typeof o === "string")
4628
- return _array_like_to_array$s(o, minLen);
4628
+ return _array_like_to_array$r(o, minLen);
4629
4629
  var n = Object.prototype.toString.call(o).slice(8, -1);
4630
4630
  if (n === "Object" && o.constructor)
4631
4631
  n = o.constructor.name;
4632
4632
  if (n === "Map" || n === "Set")
4633
4633
  return Array.from(n);
4634
4634
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
4635
- return _array_like_to_array$s(o, minLen);
4635
+ return _array_like_to_array$r(o, minLen);
4636
4636
  }
4637
4637
  var findCountryByCode = function(countryCode) {
4638
4638
  var countriesList = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : phoneInfo;
@@ -4715,18 +4715,18 @@ var getPhoneMask = function(countryCode) {
4715
4715
  }
4716
4716
  return mask;
4717
4717
  };
4718
- function _array_like_to_array$r(arr, len) {
4718
+ function _array_like_to_array$q(arr, len) {
4719
4719
  if (len == null || len > arr.length)
4720
4720
  len = arr.length;
4721
4721
  for (var i = 0, arr2 = new Array(len); i < len; i++)
4722
4722
  arr2[i] = arr[i];
4723
4723
  return arr2;
4724
4724
  }
4725
- function _array_with_holes$q(arr) {
4725
+ function _array_with_holes$p(arr) {
4726
4726
  if (Array.isArray(arr))
4727
4727
  return arr;
4728
4728
  }
4729
- function _iterable_to_array_limit$q(arr, i) {
4729
+ function _iterable_to_array_limit$p(arr, i) {
4730
4730
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
4731
4731
  if (_i == null)
4732
4732
  return;
@@ -4754,24 +4754,24 @@ function _iterable_to_array_limit$q(arr, i) {
4754
4754
  }
4755
4755
  return _arr;
4756
4756
  }
4757
- function _non_iterable_rest$q() {
4757
+ function _non_iterable_rest$p() {
4758
4758
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
4759
4759
  }
4760
- function _sliced_to_array$q(arr, i) {
4761
- return _array_with_holes$q(arr) || _iterable_to_array_limit$q(arr, i) || _unsupported_iterable_to_array$r(arr, i) || _non_iterable_rest$q();
4760
+ function _sliced_to_array$p(arr, i) {
4761
+ return _array_with_holes$p(arr) || _iterable_to_array_limit$p(arr, i) || _unsupported_iterable_to_array$q(arr, i) || _non_iterable_rest$p();
4762
4762
  }
4763
- function _unsupported_iterable_to_array$r(o, minLen) {
4763
+ function _unsupported_iterable_to_array$q(o, minLen) {
4764
4764
  if (!o)
4765
4765
  return;
4766
4766
  if (typeof o === "string")
4767
- return _array_like_to_array$r(o, minLen);
4767
+ return _array_like_to_array$q(o, minLen);
4768
4768
  var n = Object.prototype.toString.call(o).slice(8, -1);
4769
4769
  if (n === "Object" && o.constructor)
4770
4770
  n = o.constructor.name;
4771
4771
  if (n === "Map" || n === "Set")
4772
4772
  return Array.from(n);
4773
4773
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
4774
- return _array_like_to_array$r(o, minLen);
4774
+ return _array_like_to_array$q(o, minLen);
4775
4775
  }
4776
4776
  var rgba = hexToRgba;
4777
4777
  var transformToKebab = function(string) {
@@ -4894,7 +4894,7 @@ var trimStringToMaxLength = function(val, maxLength) {
4894
4894
  var addDataAttributes = function() {
4895
4895
  var data = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
4896
4896
  return Object.fromEntries(Object.entries(data).map(function(param) {
4897
- var _param = _sliced_to_array$q(param, 2), key = _param[0], value = _param[1];
4897
+ var _param = _sliced_to_array$p(param, 2), key = _param[0], value = _param[1];
4898
4898
  return isString(value) && isStringNotEmpty(value) || isNotEmpty(value) ? [
4899
4899
  "data-".concat(transformToKebab(key)),
4900
4900
  value
@@ -6420,7 +6420,7 @@ function usePopper(referenceElement, popperElement, _temp) {
6420
6420
  }, [enabled, referenceElement, popperElement]);
6421
6421
  return popperState;
6422
6422
  }
6423
- function _array_like_to_array$q(arr, len) {
6423
+ function _array_like_to_array$p(arr, len) {
6424
6424
  if (len == null || len > arr.length)
6425
6425
  len = arr.length;
6426
6426
  for (var i = 0, arr2 = new Array(len); i < len; i++)
@@ -6429,7 +6429,7 @@ function _array_like_to_array$q(arr, len) {
6429
6429
  }
6430
6430
  function _array_without_holes$7(arr) {
6431
6431
  if (Array.isArray(arr))
6432
- return _array_like_to_array$q(arr);
6432
+ return _array_like_to_array$p(arr);
6433
6433
  }
6434
6434
  function _define_property$_(obj, key, value) {
6435
6435
  if (key in obj) {
@@ -6467,20 +6467,20 @@ function _object_spread$Z(target) {
6467
6467
  return target;
6468
6468
  }
6469
6469
  function _to_consumable_array$7(arr) {
6470
- return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$q(arr) || _non_iterable_spread$7();
6470
+ return _array_without_holes$7(arr) || _iterable_to_array$7(arr) || _unsupported_iterable_to_array$p(arr) || _non_iterable_spread$7();
6471
6471
  }
6472
- function _unsupported_iterable_to_array$q(o, minLen) {
6472
+ function _unsupported_iterable_to_array$p(o, minLen) {
6473
6473
  if (!o)
6474
6474
  return;
6475
6475
  if (typeof o === "string")
6476
- return _array_like_to_array$q(o, minLen);
6476
+ return _array_like_to_array$p(o, minLen);
6477
6477
  var n = Object.prototype.toString.call(o).slice(8, -1);
6478
6478
  if (n === "Object" && o.constructor)
6479
6479
  n = o.constructor.name;
6480
6480
  if (n === "Map" || n === "Set")
6481
6481
  return Array.from(n);
6482
6482
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
6483
- return _array_like_to_array$q(o, minLen);
6483
+ return _array_like_to_array$p(o, minLen);
6484
6484
  }
6485
6485
  var useDropdown = function(param) {
6486
6486
  var isOpen = param.isOpen, onDropdownClose = param.onDropdownClose, referenceElement = param.referenceElement, dropdownElement = param.dropdownElement, options = param.options, _param_dependenciesForPositionUpdating = param.dependenciesForPositionUpdating, dependenciesForPositionUpdating = _param_dependenciesForPositionUpdating === void 0 ? [] : _param_dependenciesForPositionUpdating;
@@ -6822,10 +6822,11 @@ var iconsList = checkIcons({
6822
6822
  check: {
6823
6823
  paths: [
6824
6824
  {
6825
- d: "M9.333 11.252l4.96-4.96a1 1 0 011.414 1.415l-5.667 5.667a1 1 0 01-1.414 0L6.293 11.04a1 1 0 111.414-1.414l1.626 1.626z"
6825
+ d: "m7.5 13.086 7.793-7.793a1 1 0 1 1 1.414 1.414l-8.5 8.5a1 1 0 0 1-1.414 0l-3.5-3.5a1 1 0 1 1 1.414-1.414L7.5 13.086Z"
6826
6826
  }
6827
6827
  ]
6828
6828
  },
6829
+ /** @deprecated */
6829
6830
  "check-big": {
6830
6831
  paths: [
6831
6832
  {
@@ -6837,17 +6838,8 @@ var iconsList = checkIcons({
6837
6838
  viewBox: "0 0 20 20",
6838
6839
  paths: [
6839
6840
  {
6840
- d: "M3 10.5L5.92929 13.4293C5.96834 13.4683 6.03166 13.4683 6.07071 13.4293L13.5 6",
6841
- strokeWidth: 2,
6842
- strokeLinecap: "round",
6843
- stroke: "currentColor",
6844
- fill: "none"
6845
- },
6846
- {
6847
- d: "M10.2071 13.2929L9.5 12.5858L8.08579 14L8.79289 14.7071L10.2071 13.2929ZM18.2071 7.70711C18.5976 7.31658 18.5976 6.68342 18.2071 6.29289C17.8166 5.90237 17.1834 5.90237 16.7929 6.29289L18.2071 7.70711ZM9.92929 14.4293L10.6364 13.7222L9.92929 14.4293ZM10.0707 14.4293L9.3636 13.7222L10.0707 14.4293ZM8.79289 14.7071L9.22218 15.1364L10.6364 13.7222L10.2071 13.2929L8.79289 14.7071ZM10.7778 15.1364L18.2071 7.70711L16.7929 6.29289L9.3636 13.7222L10.7778 15.1364ZM9.22218 15.1364C9.65176 15.566 10.3482 15.566 10.7778 15.1364L9.3636 13.7222C9.71508 13.3707 10.2849 13.3707 10.6364 13.7222L9.22218 15.1364Z",
6848
- fill: "currentColor",
6849
- stroke: "none",
6850
- fillRule: void 0
6841
+ d: "M14.207 6.707a1 1 0 0 0-1.414-1.414L6 12.086 3.707 9.793a1 1 0 0 0-1.414 1.414l2.93 2.93a1.1 1.1 0 0 0 1.555 0l7.43-7.43Zm4 1a1 1 0 0 0-1.414-1.414L10 13.086l-.5-.5L8.086 14l1.136 1.136a1.1 1.1 0 0 0 1.556 0l7.43-7.429Z",
6842
+ fillRule: "evenodd"
6851
6843
  }
6852
6844
  ]
6853
6845
  },
@@ -7165,7 +7157,7 @@ var iconsList = checkIcons({
7165
7157
  minus: {
7166
7158
  paths: [
7167
7159
  {
7168
- d: "M16 11H4c-.552 0-1-.448-1-1s.448-1 1-1h12c.552 0 1 .448 1 1s-.448 1-1 1z"
7160
+ d: "M16 11H4a1 1 0 1 1 0-2h12a1 1 0 1 1 0 2Z"
7169
7161
  }
7170
7162
  ]
7171
7163
  },
@@ -8042,14 +8034,14 @@ var useStyles$Q = createThemedStyles("AccountInfo", _object_spread$T({
8042
8034
  height: 32
8043
8035
  }
8044
8036
  }, animations.slideUp));
8045
- function _array_like_to_array$p(arr, len) {
8037
+ function _array_like_to_array$o(arr, len) {
8046
8038
  if (len == null || len > arr.length)
8047
8039
  len = arr.length;
8048
8040
  for (var i = 0, arr2 = new Array(len); i < len; i++)
8049
8041
  arr2[i] = arr[i];
8050
8042
  return arr2;
8051
8043
  }
8052
- function _array_with_holes$p(arr) {
8044
+ function _array_with_holes$o(arr) {
8053
8045
  if (Array.isArray(arr))
8054
8046
  return arr;
8055
8047
  }
@@ -8066,7 +8058,7 @@ function _define_property$T(obj, key, value) {
8066
8058
  }
8067
8059
  return obj;
8068
8060
  }
8069
- function _iterable_to_array_limit$p(arr, i) {
8061
+ function _iterable_to_array_limit$o(arr, i) {
8070
8062
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
8071
8063
  if (_i == null)
8072
8064
  return;
@@ -8094,7 +8086,7 @@ function _iterable_to_array_limit$p(arr, i) {
8094
8086
  }
8095
8087
  return _arr;
8096
8088
  }
8097
- function _non_iterable_rest$p() {
8089
+ function _non_iterable_rest$o() {
8098
8090
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8099
8091
  }
8100
8092
  function _object_spread$S(target) {
@@ -8136,21 +8128,21 @@ function _object_spread_props$K(target, source) {
8136
8128
  }
8137
8129
  return target;
8138
8130
  }
8139
- function _sliced_to_array$p(arr, i) {
8140
- return _array_with_holes$p(arr) || _iterable_to_array_limit$p(arr, i) || _unsupported_iterable_to_array$p(arr, i) || _non_iterable_rest$p();
8131
+ function _sliced_to_array$o(arr, i) {
8132
+ return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$o(arr, i) || _non_iterable_rest$o();
8141
8133
  }
8142
- function _unsupported_iterable_to_array$p(o, minLen) {
8134
+ function _unsupported_iterable_to_array$o(o, minLen) {
8143
8135
  if (!o)
8144
8136
  return;
8145
8137
  if (typeof o === "string")
8146
- return _array_like_to_array$p(o, minLen);
8138
+ return _array_like_to_array$o(o, minLen);
8147
8139
  var n = Object.prototype.toString.call(o).slice(8, -1);
8148
8140
  if (n === "Object" && o.constructor)
8149
8141
  n = o.constructor.name;
8150
8142
  if (n === "Map" || n === "Set")
8151
8143
  return Array.from(n);
8152
8144
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
8153
- return _array_like_to_array$p(o, minLen);
8145
+ return _array_like_to_array$o(o, minLen);
8154
8146
  }
8155
8147
  var AccountInfo = function(param) {
8156
8148
  var data = param.data, testId = param.testId, avatar = param.avatar, tweakStyles = param.tweakStyles, accountName = param.accountName, options = param.options;
@@ -8164,7 +8156,7 @@ var AccountInfo = function(param) {
8164
8156
  });
8165
8157
  var nameRef = useRef(null);
8166
8158
  var dropdownRef = useRef(null);
8167
- var _useState = _sliced_to_array$p(useState(false), 2), isMenuOpen = _useState[0], setIsMenuOpen = _useState[1];
8159
+ var _useState = _sliced_to_array$o(useState(false), 2), isMenuOpen = _useState[0], setIsMenuOpen = _useState[1];
8168
8160
  var toggleMenu = function(event) {
8169
8161
  event.stopPropagation();
8170
8162
  setIsMenuOpen(function(v) {
@@ -8830,6 +8822,8 @@ var useStyles$K = createThemedStyles("Checkbox", {
8830
8822
  gap: 14,
8831
8823
  width: "fit-content"
8832
8824
  },
8825
+ checked: {},
8826
+ invalid: {},
8833
8827
  disabled: {
8834
8828
  cursor: "default",
8835
8829
  pointerEvents: "none"
@@ -8854,22 +8848,10 @@ var useStyles$K = createThemedStyles("Checkbox", {
8854
8848
  justifyContent: "center",
8855
8849
  boxSizing: "border-box"
8856
8850
  },
8857
- checked: {},
8858
8851
  labelPositionLeft: {
8859
8852
  flexDirection: "row-reverse"
8860
8853
  }
8861
8854
  });
8862
- function _array_like_to_array$o(arr, len) {
8863
- if (len == null || len > arr.length)
8864
- len = arr.length;
8865
- for (var i = 0, arr2 = new Array(len); i < len; i++)
8866
- arr2[i] = arr[i];
8867
- return arr2;
8868
- }
8869
- function _array_with_holes$o(arr) {
8870
- if (Array.isArray(arr))
8871
- return arr;
8872
- }
8873
8855
  function _define_property$P(obj, key, value) {
8874
8856
  if (key in obj) {
8875
8857
  Object.defineProperty(obj, key, {
@@ -8883,37 +8865,6 @@ function _define_property$P(obj, key, value) {
8883
8865
  }
8884
8866
  return obj;
8885
8867
  }
8886
- function _iterable_to_array_limit$o(arr, i) {
8887
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
8888
- if (_i == null)
8889
- return;
8890
- var _arr = [];
8891
- var _n = true;
8892
- var _d = false;
8893
- var _s, _e;
8894
- try {
8895
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
8896
- _arr.push(_s.value);
8897
- if (i && _arr.length === i)
8898
- break;
8899
- }
8900
- } catch (err) {
8901
- _d = true;
8902
- _e = err;
8903
- } finally {
8904
- try {
8905
- if (!_n && _i["return"] != null)
8906
- _i["return"]();
8907
- } finally {
8908
- if (_d)
8909
- throw _e;
8910
- }
8911
- }
8912
- return _arr;
8913
- }
8914
- function _non_iterable_rest$o() {
8915
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
8916
- }
8917
8868
  function _object_spread$O(target) {
8918
8869
  for (var i = 1; i < arguments.length; i++) {
8919
8870
  var source = arguments[i] != null ? arguments[i] : {};
@@ -8953,50 +8904,27 @@ function _object_spread_props$G(target, source) {
8953
8904
  }
8954
8905
  return target;
8955
8906
  }
8956
- function _sliced_to_array$o(arr, i) {
8957
- return _array_with_holes$o(arr) || _iterable_to_array_limit$o(arr, i) || _unsupported_iterable_to_array$o(arr, i) || _non_iterable_rest$o();
8958
- }
8959
- function _unsupported_iterable_to_array$o(o, minLen) {
8960
- if (!o)
8961
- return;
8962
- if (typeof o === "string")
8963
- return _array_like_to_array$o(o, minLen);
8964
- var n = Object.prototype.toString.call(o).slice(8, -1);
8965
- if (n === "Object" && o.constructor)
8966
- n = o.constructor.name;
8967
- if (n === "Map" || n === "Set")
8968
- return Array.from(n);
8969
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))
8970
- return _array_like_to_array$o(o, minLen);
8971
- }
8972
8907
  function Checkbox(param) {
8973
- var children = param.children, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_isReadonly = param.isReadonly, isReadonly = _param_isReadonly === void 0 ? false : _param_isReadonly, _param_isChecked = param.isChecked, isChecked = _param_isChecked === void 0 ? false : _param_isChecked, value = param.value, data = param.data, testId = param.testId, _param_isSemiChecked = param.isSemiChecked, isSemiChecked = _param_isSemiChecked === void 0 ? false : _param_isSemiChecked, _param_labelPosition = param.labelPosition, labelPosition = _param_labelPosition === void 0 ? "right" : _param_labelPosition, tweakStyles = param.tweakStyles, onSelect = param.onSelect;
8908
+ var value = param.value, children = param.children, _param_isChecked = param.isChecked, isChecked = _param_isChecked === void 0 ? false : _param_isChecked, _param_isSemiChecked = param.isSemiChecked, isSemiChecked = _param_isSemiChecked === void 0 ? false : _param_isSemiChecked, _param_isInvalid = param.isInvalid, isInvalid = _param_isInvalid === void 0 ? false : _param_isInvalid, _param_isDisabled = param.isDisabled, isDisabled = _param_isDisabled === void 0 ? false : _param_isDisabled, _param_isReadonly = param.isReadonly, isReadonly = _param_isReadonly === void 0 ? false : _param_isReadonly, _param_labelPosition = param.labelPosition, labelPosition = _param_labelPosition === void 0 ? "right" : _param_labelPosition, data = param.data, testId = param.testId, tweakStyles = param.tweakStyles, onSelect = param.onSelect;
8974
8909
  var classes = useStyles$K({
8975
8910
  theme: tweakStyles
8976
8911
  });
8977
- var _useState = _sliced_to_array$o(useState(false), 2), isSelected = _useState[0], setIsSelected = _useState[1];
8978
8912
  var hasAction = !isDisabled && !isReadonly;
8913
+ var isSelected = isChecked || isSemiChecked;
8979
8914
  var onToggle = function(event) {
8980
- var isSelectedNext = !isSelected;
8981
- onSelect({
8915
+ return onSelect === null || onSelect === void 0 ? void 0 : onSelect({
8982
8916
  value,
8983
- isSelected: isSelectedNext
8917
+ isSelected: !isSelected
8984
8918
  }, event);
8985
- setIsSelected(isSelectedNext);
8986
8919
  };
8987
- useEffect(function() {
8988
- setIsSelected(isChecked);
8989
- }, [
8990
- isChecked
8991
- ]);
8992
8920
  var _obj;
8993
8921
  return /* @__PURE__ */ jsxs("label", _object_spread_props$G(_object_spread$O({
8994
- className: clsx(classes.root, (_obj = {}, _define_property$P(_obj, classes.disabled, isDisabled), _define_property$P(_obj, classes.labelPositionLeft, labelPosition === "left"), _obj))
8922
+ className: clsx(classes.root, (_obj = {}, _define_property$P(_obj, classes.checked, isSelected), _define_property$P(_obj, classes.invalid, isInvalid), _define_property$P(_obj, classes.disabled, isDisabled), _define_property$P(_obj, classes.labelPositionLeft, labelPosition === "left"), _obj))
8995
8923
  }, addDataTestId(testId), addDataAttributes(data)), {
8996
8924
  children: [
8997
8925
  /* @__PURE__ */ jsx("input", _object_spread$O({
8998
- type: "checkbox",
8999
8926
  className: classes.input,
8927
+ type: "checkbox",
9000
8928
  checked: isSelected,
9001
8929
  disabled: isDisabled,
9002
8930
  readOnly: isReadonly
@@ -9005,8 +8933,8 @@ function Checkbox(param) {
9005
8933
  onKeyDown: getSelectKeyHandler(onToggle)
9006
8934
  })),
9007
8935
  /* @__PURE__ */ jsx("div", {
9008
- className: clsx(classes.check, isSelected && classes.checked),
9009
- children: /* @__PURE__ */ jsx(Icon, {
8936
+ className: classes.check,
8937
+ children: isSelected && /* @__PURE__ */ jsx(Icon, {
9010
8938
  type: isSemiChecked ? "minus" : "check"
9011
8939
  })
9012
8940
  }),
@@ -14169,13 +14097,16 @@ function MultiSelectList(param) {
14169
14097
  var handleClear = function() {
14170
14098
  onChange(void 0);
14171
14099
  };
14172
- var onSelect = function(val) {
14173
- var _chosenValues_filter;
14174
- handleSelectValue(val.isSelected ? _to_consumable_array$5(chosenValues !== null && chosenValues !== void 0 ? chosenValues : []).concat([
14175
- val.value
14176
- ]) : (_chosenValues_filter = chosenValues === null || chosenValues === void 0 ? void 0 : chosenValues.filter(function(v) {
14177
- return getValueId(v) !== getValueId(val.value);
14178
- })) !== null && _chosenValues_filter !== void 0 ? _chosenValues_filter : []);
14100
+ var onSelect = function(param2) {
14101
+ var checkboxValue = param2.value, isSelected = param2.isSelected;
14102
+ if (isNotEmpty(checkboxValue)) {
14103
+ var _chosenValues_filter;
14104
+ handleSelectValue(isSelected ? _to_consumable_array$5(chosenValues !== null && chosenValues !== void 0 ? chosenValues : []).concat([
14105
+ checkboxValue
14106
+ ]) : (_chosenValues_filter = chosenValues === null || chosenValues === void 0 ? void 0 : chosenValues.filter(function(v) {
14107
+ return getValueId(v) !== getValueId(checkboxValue);
14108
+ })) !== null && _chosenValues_filter !== void 0 ? _chosenValues_filter : []);
14109
+ }
14179
14110
  };
14180
14111
  var handleKeyDown = function(event) {
14181
14112
  if (event.code === "Escape") {